note 38659 deleted from control-structures.foreach by felipe
| From: | felipe@php.net | Date: | Sun, 09 Dec 2007 16:07:00 +0000 |
| Subject: | note 38659 deleted from control-structures.foreach by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-133051@lists.php.net to get a copy of this message | ||
Note Submitter: endofyourself at yahoo dot com
----
If you are trying to do something like:
<?PHP
foreach(
$someArray1 as $someValue1 ,
$someArray2 as $someValue2
) {
echo $someValue1;
echo $someValue2;
}
?>
Pleas note that this IS NOT possible (although it would be cool). However, here is another way to
acheive a similar effect:
<?PHP
for(
;
list(, $someValue1 ) = each( $someArray1 ) ,
list(, $someValue2 ) = each( $someArray2 )
;
) {
echo $someValue1;
echo $someValue2;
}
?>