shadedecho
Programmer
is there anyway to get a reference to an actual array item and assign that to another variable? like this:
notice that $arr["a"] is itself an array, so one would think that you could actually get an address reference to that (sub) array. However, every syntax I try to do gives me PHP errors. I have tried {} and () around the array item, still no go.
anyone know how to do this?
Code:
$arr = array("a" => array("a_1" => 1, "a_2" => 2), "b" => "b_1");
$a = &{$arr["a"]};
notice that $arr["a"] is itself an array, so one would think that you could actually get an address reference to that (sub) array. However, every syntax I try to do gives me PHP errors. I have tried {} and () around the array item, still no go.
anyone know how to do this?