I have a nasty little problem with the pointer opperator in php (&).
I want to loop through a while loop, which writes data in an array.
Each time it is supposed to write into the next dimension of the array (1st in $array, then in $array[0], then in array[0][0], etc).
I wanted to do this by linking to $array with a pointer, then changing the pointer like this:
$pointer = &array;
while($bla){
$pointer = &$pointer[0];
}
So everytime while is triggered the pointer links to a further dimension of $array.
That doesn’t seem to work though…
I would really appretiate your help, thank you.
I tried your code and it works. Test:
This first creates the array and then does the loop.