note 3374 rejected and deleted from Alternative syntax for control structures by philip
| From: | philip@php.net | Date: | Tue, 31 Jul 2001 15:04:38 +0000 |
| Subject: | note 3374 rejected and deleted from Alternative syntax for control structures by philip | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16115@lists.php.net to get a copy of this message | ||
I run into a parse error if I try to do the following:
<pre>
IF (some_condition):
if(condition_a)
//do something
if(condition_b)
//do something else
ELSE:
</pre>
The way I've found to resolve this is to put "else;" before the "ELSE:" to
totally close off the second inner conditional. This is an older version of PHP, but even if this
has been fixed (I don't know if I'd consider it a bug), it may still be considered useful.
-a