How to get ref of an array in PHP 5 ?
- by Relax
In php 5, all variable and objects are passed by reference, but i can't get my codes work
My codes is:
$arrayA = array();
$array = $arrayA;
...
if(!in_array(thedata, $array) // if i use & to get ref, got an error here, should i use *$array here?
$array[] = thedata;
var_dump($arrayA);
The result is empty, am i missing something simple?