Bug #838: Parser error in nested if

From: Date: Fri, 09 Oct 1998 09:47:05 +0000
Subject: Bug #838: Parser error in nested if
Groups: php.dev 
Request: Send a blank email to php-dev+get-1750@lists.php.net to get a copy of this message
From: agarcia@at4.net Operating system: win95 and linux 2.035 RH5.0 PHP version: 3.0.5 PHP Bug Type: Parser error Bug description: Parser error in nested if <? phpinfo(); 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. -- 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 (#1750) next »