Arrays' key() function

From: Date: Thu, 10 Apr 2003 04:27:21 +0000
Subject: Arrays' key() function
Groups: php.general 
Request: Send a blank email to php-general+get-143268@lists.php.net to get a copy of this message
Hello. The documentation for the /foreach/ construct says that the implementation actually works on a copy of the respective array. It also says, though, that the internal pointer of the original array *is* updated by the construct. What is not clear to me is whether that updating of the pointer is only done at the *end* of the loop or at each iteration. Well, I have done some simple tests [1] and it seems the pointer is not updated *during* nor *after* the processing of the loop! What is going on? [1] http://zunino.dnsalias.net:5555/array-keys.php Thank you, -- Ney André de Mello Zunino

« previous php.general (#143268) next »