Bug #838 Updated: Parser error in nested if

From: Date: Fri, 09 Oct 1998 09:48:12 +0000
Subject: Bug #838 Updated: Parser error in nested if
Groups: php.dev 
Request: Send a blank email to php-dev+get-1751@lists.php.net to get a copy of this message
ID: 838 User Update by: agarcia@at4.net Status: Open Bug Type: Parser error Description: Parser error in nested if <? 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. Full Bug description available at: http://ca.php.net/bugs.php3?id=838 -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#1751) next »