Jump to content

if statements


Immortal55

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]
Link to comment
https://forums.phpfreaks.com/topic/5127-if-statements/#findComment-18194
Share on other sites

Archived

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

×
×
  • Create New...

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.