私は、navigation.phpというファイルで変更したいワードプレスのテーマで次のような状況にあります
$array_test = array (1,2,3,4);
function func1()
{
global $array_test;
echo "test"; // to ensure that the function has been called
echo $array_test[2]; // this writes nothing, though the function is being called
}
header.php というファイルで関数func1
が呼び出されていますが、まだ の値に$array_test[2]
アクセスできません。
あなたはなにか考えはありますか?
編集:ワードプレスまたはテーマの問題であると思われますが、テーマが無料の health_care_wp_theme であるかどうかはわかりません