Re: returning early from a function.
| From: | Matt Matijevich | Date: | Wed, 31 Dec 2003 17:16:59 +0000 |
| Subject: | Re: returning early from a function. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-173558@lists.php.net to get a copy of this message | ||
[snip]
function test($s)
{
if($s = 'this') return false;
if($s = 'that') return false;
return true;
}
[/snip]
try this:
function test($s)
{
if($s == 'this') return false;
if($s == 'that') return false;
return true;
}