RE: [PHP] nested if parse error

From: Date: Thu, 30 May 2002 13:52:31 +0000
Subject: RE: [PHP] nested if parse error
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-99910@lists.php.net to get a copy of this message
I think coding without the use of brackets and line seperation will drive you mad! A working copy of your code: <? if (1): if (1): echo "hello"; else: endif; endif; ?> This in my humble op is so much neater and you can debug this in a second. if (1){ if (1) { echo "Hello"; } } else { } - James -------------------------- W: www.londontown.com @: james@londontown.com -------------------------- -----Original Message----- From: Miroslav Figlar [mailto:mfiglar@genesispo.sk] Sent: 30 May 2002 13:05 To: php-general@lists.php.net Subject: [PHP] nested if parse error could somebody explain me please what is wrong with this piece of code? <? if (1): if (1) echo "hello"; else: endif; ?> it gives me parse error on line 4 this works fine (no parse error): <? if (1): else: if (1) echo "hello"; endif; ?> thank you miro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#99910) next »