note 39587 deleted from control-structures.foreach by felipe
| From: | felipe@php.net | Date: | Sun, 09 Dec 2007 16:06:24 +0000 |
| Subject: | note 39587 deleted from control-structures.foreach by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133050@lists.php.net to get a copy of this message | ||
Note Submitter: thomas dot kaarud at netcom dot no
----
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"; }
?>