note 72115 deleted from control-structures.foreach by bobby

From: Date: Wed, 03 Jan 2007 15:16:20 +0000
Subject: note 72115 deleted from control-structures.foreach by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121251@lists.php.net to get a copy of this message
Note Submitter: ---- "Note: Unless the array is referenced, foreach operates on a copy of the specified array and not the array itself. Therefore, the array pointer is not modified as with the each() construct, and changes to the array element returned are not reflected in the original array. However, the internal pointer of the original array is advanced with the processing of the array. Assuming the foreach loop runs to completion, the array's internal pointer will be at the end of the array." Am I the only person who thinks that this statement is completely contradictory? Either the pointer of the original array is advanced, or it is not. This needs to be made a lot clearer.

« previous php.notes (#121251) next »