note 119454 added to control-structures.elseif

From: Date: Fri, 10 Jun 2016 03:08:48 +0000
Subject: note 119454 added to control-structures.elseif
Groups: php.notes 
Request: Send a blank email to php-notes+get-205676@lists.php.net to get a copy of this message
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; ---- Server IP: 72.52.91.14 Probable Submitter: 186.15.1.11 ---- Manual Page -- http://php.net/manual/en/control-structures.elseif.php Edit -- https://master.php.net/note/edit/119454 Del: integrated -- https://master.php.net/note/delete/119454/integrated Del: useless -- https://master.php.net/note/delete/119454/useless Del: bad code -- https://master.php.net/note/delete/119454/bad+code Del: spam -- https://master.php.net/note/delete/119454/spam Del: non-english -- https://master.php.net/note/delete/119454/non-english Del: in docs -- https://master.php.net/note/delete/119454/in+docs Del: other reasons-- https://master.php.net/note/delete/119454 Reject -- https://master.php.net/note/reject/119454 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#205676) next »