Re: Suggestion for "IN()"

From: Date: Fri, 01 Oct 2004 13:10:04 +0000
Subject: Re: Suggestion for "IN()"
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-198402@lists.php.net to get a copy of this message
Daniel Schierbeck wrote:
    return ($var > $min && $var < $max) ? TRUE : FALSE;
(...)
    return in_array($needle, $haystack) ? TRUE : FALSE;
You can return booleans without comparing them to true/false: return $var > $min && $var < $max; return in_array($needle, $haystack); Christophe

« previous php.general (#198402) next »