Page 1 of 1

nesting in php

Posted: Mon Jul 03, 2006 11:35 am
by barry_normal
Sorry for the newbie style question but are nested for loops allowed in php?

Like this:

Code: Select all

for($q=0; $q<sizeof($add); $q++){
        for($u=0; $u<sizeof($keep); $u++){
        echo $u ."XXX ";
        if(1){
        echo "<span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span>";
        $temp_arr[$cnt] = $add[$q];
        $cnt++;
            }
        }
    }
Any help would be greatfully received

B

Posted: Mon Jul 03, 2006 12:06 pm
by Burrito
yes