|
Posted by Sam Waller on 09/09/07 18:56
I'm trying do do something like this:
$a = array();
func($a);
printf("array size in main = %d\r\n", count($a));
/////////////////////////////////////
function func($_a) {
array_push($_a, 22);
printf("array size in func = %d\r\n", count($_a));
}
This prints:
array size in main = 0
array size in func = 1
It looks like the data is no longer available in the calling function. Is there a way to get this to
work so that I have the computed array available in the calling function?
thanks,
Sam
Navigation:
[Reply to this message]
|