Code: Select all
$a[] = array("cat", "dog");
global $a[];
text $a[0];
Code: Select all
global $a[];
text $a[0];
$a[0] is undefined in the second script.According to the documentation, the
global command is supported by arrays:Am I misunderstanding how global arrays work, or is this expected behavior?The global command is supported by arrays, eg: global $a[];
XYplorer Beta Club