note 119454 deleted from control-structures.elseif by cmb
| From: | cmb@php.net | Date: | Fri, 10 Jun 2016 13:07:45 +0000 |
| Subject: | note 119454 deleted from control-structures.elseif by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-205679@lists.php.net to get a copy of this message | ||
Note Submitter: htroyo
----
The reason you can't separate elseif using the alternative is... because you are using the
alternative syntax, so if you want to separate elseif you must write:
if($a > $b):
echo $a." is greater than ".$b;
else: if($a == $b): // Will not compile.
echo "The above line causes a parse error.";
endif;
endif;
but i thing it makes no sense if you are using alternative syntax
if($a > $b):
echo $a." is greater than ".$b;
elseif ($a == $b): // Will not compile.
echo "The above line causes a parse error.";
endif;