note 50384 deleted from control-structures.foreach by aidan
| From: | aidan@php.net | Date: | Sat, 12 Mar 2005 00:37:29 +0000 |
| Subject: | note 50384 deleted from control-structures.foreach by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-86310@lists.php.net to get a copy of this message | ||
Note Submitter: nomis_uk at hotmail dot com
----
QUOTE
__________________________________________________
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).
__________________________________________________
Why not use a multidimensional array?
<?PHP
$newArray = array($someArray1, $someArray2);
foreach($newArray as $eachArray){
foreach($eachArray as $someValue){
echo $somevalue;
}
}