I try to work on an global array from a function. Here is my code:
$myArray = array();
myfunc($myArray);
var_dump($myArray);
function myfunc($myArray){
//perform some other tasks
$myArray['name']='John';
}
But didn't work. The var_dump
return empty array. How can I get the array being pass up to the global?
Thank you.