i am having the following situation in a wordpress theme which I want to modify in a file called 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
}
in the file called header.php the function func1
is being called, still the value of $array_test[2]
cannot be accessed,
Do you have any ideas?
EDIT:
i suspect it is an issue with wordpress or the theme, but i am not sure
the theme is the free health_care_wp_theme
In navigation.php, (in case if there’s no class in that file,define one)
In header.php