Stupid newbee question.

From: Date: Sat, 29 Jul 2000 01:13:11 +0000
Subject: Stupid newbee question.
Groups: php.general 
Request: Send a blank email to php-general+get-8904@lists.php.net to get a copy of this message
Can you put an if/else pair inside the if or else of an outer pair. In other words could I do this: if (whatever){ If (whatever){ blah blah; }Else{ blah blah; } }else{ If (whatever){ blah blah; }Else{ blah blah; } } If the answer is yes and this should not cause any problems then I probably am missing a comma or quote or something else that just doesn't cause a problem until the code gets to the outer level else. If this doesn't work is there a way around doing this, or maybe a different syntax I should be using. I'm a Cold Fusion programmer and I know I can nest if/else pairs to my hearts content (as long as I can keep track of the brackets) in that language, but I'm very new to PHP so I'm wondering if it has different ways of doing this sort of thing. Ed

« previous php.general (#8904) next »