note 39587 added to control-structures.foreach

From: Date: Tue, 03 Feb 2004 10:41:23 +0000
Subject: note 39587 added to control-structures.foreach
Groups: php.notes 
Request: Send a blank email to php-notes+get-64593@lists.php.net to get a copy of this message
A more elegant way to do this, without involving new arrays or making PHP5-specific code, would be: <?php foreach ($a as $x => $a) { echo "$b[$x] : $a"; } ?> ---- Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+39587 Delete -- http://master.php.net/manage/user-notes.php?action=delete+39587&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+39587&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#64593) next »