note 90820 deleted from class.iterator by danbrown

From: Date: Mon, 11 May 2009 18:48:28 +0000
Subject: note 90820 deleted from class.iterator by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-154467@lists.php.net to get a copy of this message
Note Submitter: werner at procurios dot nl ---- The for() loops in the post below aren't correct. They don't call the functions in the exact same order as foreach() does. If you want to emulate a foreach() loop using for() it should look like this: <?php for ($Iterator->rewind(); $Iterator->valid(); $Iterator->next()) { $value = $Iterator->current(); $key = $Iterator->key(); } ?>

« previous php.notes (#154467) next »