note 83090 deleted from tutorial.useful by philip
| From: | philip@php.net | Date: | Fri, 13 Jun 2008 04:36:03 +0000 |
| Subject: | note 83090 deleted from tutorial.useful by philip | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-140397@lists.php.net to get a copy of this message | ||
Note Submitter: tomcraig_fmu at yahoo dot com
----
As an instructor of computer languages, I think your use of a double negative is a poor choice and
bad example. Here is how I would code your example:
<?php
if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') == TRUE)
{
echo 'You are using Internet Explorer.<br />';
}
?>
Now instead of saying something "if something is not FALSE", you are saying if
"something is TRUE". Having programmed for over 30 years, I have found this much easier
to code, debug and pass on to future programmers.