> -----Original Message-----
> From: Miroslav Figlar [mailto:[EMAIL PROTECTED]]
> Sent: 31 May 2002 07:26
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] nested if parse error
> 
> 
> anyway it's funny that this works fine :-)
> <?
>     if (1):
>         if (1) echo "hello";
>         $a = 1;                // here can be anything else
>     else:
>     endif;
> ?>

Nope, that makes perfect sense too.  Think about where your second if(1) terminates -- 
is it still "open" when the parser reaches the "else:"?

As I said before, it just gets way too confusing if you try to mix the :-type syntax 
with anything else: if you use it at all, use it for *everything*.

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to