Posted by J.O. Aho on 01/25/07 18:03
Decavolt wrote:
> I'm very used to using a for loop over single-dim arrays but not so
> much on mult-dim arrays. I'd like to output something like this:
Usually you add a for loop for each dimention
for($i=0;$i<count($array);$i++) {
//do what you need to do for first - Search Engines, Boogers
echo $array[$i];
for($j=0;$j<count($array[$i]);$j++) {
//do what you need to do for second Google,Yahoo+Slimy,Crunchy
echo $array[$i][$j];
}
}
--
//Aho
Navigation:
[Reply to this message]
|