RE: [PHP] If statement being ignored by PHP
| From: | Mark Roedel | Date: | Fri, 30 Jun 2000 14:56:29 +0000 |
| Subject: | RE: [PHP] If statement being ignored by PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-4039@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Jurian [mailto:jurphp@unbounded.com]
> Sent: Friday, June 30, 2000 9:39 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] If statement being ignored by PHP
>
>
> well, probably doesn't work cause that if ( ) : thingie makes no sense?
>
> it's not:
> if (condition):
> code;
> endif;
>
> but:
> if (condition) {
> code;
> }
>
> also, get rid of the endif; stuff, cause that's not PHP either
Is too. (Although I do think the braces look nicer.)
http://www.php.net/manual/control-structures.alternative-syntax.php
---
Mark Roedel | "Blessed is he who has learned to laugh
Systems Programmer | at himself, for he shall never cease
LeTourneau University | to be entertained."
Longview, Texas, USA | -- John Powell