note 6574 deleted from control-structures.foreach by erica

From: Date: Mon, 07 Oct 2002 21:14:33 +0000
Subject: note 6574 deleted from control-structures.foreach by erica
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-37757@lists.php.net to get a copy of this message
I found out that the problem is the assignment of the array. Saying $arrclone = $array makes $arrclone adapt the same array-pointer, apparently. What does work is to include within the first foreach-loop: $arrclone[$n] = $array[$n]; It's a bit tricky, but it works :)

« previous php.notes (#37757) next »