nesting in php

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
barry_normal
Forum Newbie
Posts: 21
Joined: Sun Jul 02, 2006 5:02 am

nesting in php

Post 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
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

yes
Post Reply