Jump to content

Archived

This topic is now archived and is closed to further replies.

Immortal55

if statements

Recommended Posts

[!--quoteo(post=355758:date=Mar 17 2006, 12:58 AM:name=Immortal55)--][div class=\'quotetop\']QUOTE(Immortal55 @ Mar 17 2006, 12:58 AM) [snapback]355758[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Is it possible to place an IF statement in an IF statement?
[/quote]

yes called nesting

[code]

<?php
   do {
       if( ! $condition_1 ) break;
           // something
       if( ! $condition_2 ) break;
           // etc

   } while ( FALSE );
?>
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.