|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1998-10-09 08:20 UTC] zeev
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
This script causes a parser error: <? $a = $b = 2; if ($a==2): if ($b==2) print "a=2 b=2<br>"; elseif ($a=3): print "a=3<br>" endif; ?> This script also fails: <? $a = $b = 2; if ($a==2): if ($b==2) {print "a=2 b=2<br>"}; elseif ($a=3): print "a=3<br>" endif; ?> Based in the fact that this code isn't correct: if ($b==2) print "a=2 b=2<br>"; elseif ($a=3): print "a=3<br>"; endif; i think it's clear the elseif ($a=3): belongs to the previous if sentence.