Bug #18413 Updated: Cobination of nested IF statement fails

From: Date: Thu, 18 Jul 2002 17:41:34 +0000
Subject: Bug #18413 Updated: Cobination of nested IF statement fails
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-14546@lists.php.net to get a copy of this message
ID: 18413 Updated by: sniper@php.net Reported By: mark@pictura-dp.nl -Status: Open +Status: Won't fix Bug Type: Scripting Engine problem Operating System: Linux SuSE 8.0 PHP Version: 4.2.1 New Comment: Don't mix styles. If you use the old, ugly style of 'if () : endif;' stick to that, but don't try mix it with 'if () { }' Previous Comments: ------------------------------------------------------------------------ [2002-07-18 11:47:46] mark@pictura-dp.nl I think nothing's wrong with the following syntax: <?php $foo="bug?"; if($foo=="nobug"): echo "No Bug :)"; elseif(substr($foo,0,3)=="bug"): if($foo=="bug?") { echo "Bug :("; } else: echo "No problem!"; endif; ?> But it results in a parse error, unexpected ':'. Mark Lindeman the Netherlands ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=18413&edit=1

« previous php.bugs (#14546) next »