Posted by Geoff Berrow on 04/18/07 13:13
Message-ID: <1176901125.935895.207100@b58g2000hsg.googlegroups.com> from
GarryJones contained the following:
>A long winded way to do it and the only way I know how to use OR is...
>
>if ($var == 1 || $var == 3 || $var == 7 || $var == 7 || $var == 9 ||
>$var == "Table" || $var == "Chair")
>...etc
>
>But I would like to just list the values (and not the $var == for
>every possible condition
Put the values in an array and use in_array()
--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
[Back to original message]
|