read here for the alternative control structures in php
http://www.php.net/manual/en/control-structures.alternative-syntax.php
----- Original Message ----- 
From: <[EMAIL PROTECTED]>
To: "Alexander Ross" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 7:28 AM
Subject: Re: [PHP] if syntax


> This will only work if you have a single line of code after the else and 
> if.  At least that is my understanding of all languages :)
> 
> J
> 
> 
> 
> 
> 
> "Alexander Ross" <[EMAIL PROTECTED]>
> 07/10/2002 08:25 AM
> 
>  
>         To:     [EMAIL PROTECTED]
>         cc: 
>         Subject:        [PHP] if syntax
> 
> 
> I know this is correct:
> 
> if ($something)
> {
> ...
> }
> else
> {
> ...
> }
> 
> But I recently saw someone use this instead:
> 
> if($something):
>  ...
> else:
> ...
> 
> Is that also correct??   No brackets needed?
> 
> 
> 
> -- 
> 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

Reply via email to