RE: [PHP] Re: One form - Two emails, I need some help please
| From: | Ford, Mike [LSS] | Date: | Wed, 30 Jan 2002 11:28:06 +0000 |
| Subject: | RE: [PHP] Re: One form - Two emails, I need some help please | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-82712@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Matt Schroebel [mailto:MSchroebel@hsus.org]
> Sent: 29 January 2002 16:33
>
> And I write those as (true == $PHP_MAIL_FORM) so the parser
> will catch the missing second equal sign.
> This won't parse: (true = $PHP_MAIL_FORM)
Why even bother with the inefficient comparison to TRUE (which is bad style, anyway!)? Both the
above are exactly equivalent to ($PHP_MAIL_FORM), so your if statement should just read
if ($PHP_MAIL_FORM)
The only reason to do a comparison against TRUE (or FALSE) is if you need to ensure a type match as
well, using the === or !== operators.
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: m.ford@lmu.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211