Re: Suggestion for "IN()"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Christophe Chisogne wrote:
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

Thanks, nicely spotted there.


Daniel

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux