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
@: [EMAIL PROTECTED]
--------------------------
-----Original Message-----
From: Miroslav Figlar [mailto:[EMAIL PROTECTED]]
Sent: 30 May 2002 13:05
To: [EMAIL PROTECTED]
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php