Re: [PHP] Function shall receive Pointer to Array

2005-05-05 Thread Richard Lynch
On Wed, May 4, 2005 3:29 pm, Fred Rathke said: > how can a function get a pointer to an array? This does not work. I use > PHP4. Technically, in PHP, they are references, not pointers. There are no pointers in PHP. The difference is too subtle for me to understand it, but there is apparently som

Re: [PHP] Function shall receive Pointer to Array

2005-05-04 Thread Chris
I don't know what to tell you, that code should work (it does work, exactly as you gave it in my PHP 5). Chris Fred Rathke wrote: Hello, how can a function get a pointer to an array? This does not work. I use PHP4. $t = array("test" => "unchanged"); echo "testarray unchanged:\"".$t['test']."\""

[PHP] Function shall receive Pointer to Array

2005-05-04 Thread Fred Rathke
Hello, how can a function get a pointer to an array? This does not work. I use PHP4. $t = array("test" => "unchanged"); echo "testarray unchanged:\"".$t['test']."\""; changearray($t); echo "testarray hopefully changed:\"".$t['test']."\""; function changearray(&$myarray) { $myarray['test'] = "chan