Re: [PHP] returning early from a function.

From: Matt Matijevich (matijevich_at_alliancetechnologies.net)
Date: 12/31/03


Date: Wed, 31 Dec 2003 11:16:59 -0600
To: <1qazse4@cox.net>, <php-general@lists.php.net>


[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;
}