I have this php function that should do some processing in a given array:
processArray($arrayToProcess) {
$arrayToProcess['helloStackOverflow'] = TRUE;
}
The code then calls the following:
$niceArray = array('key' => 'value');
processArray($niceArray);
The key 'helloStackOverflow' is not available outside the processArray function. I tried to call the following:
processArray(&$niceArray);
Using "&" helps, however it does raise some warning:
Deprecated function: call forwarding by time is outdated; If you want to pass it by reference, change the declaration of populateForm_withTextfields ()
I tried there too, but it just stops the code.
How should I do it?
source
share