Re: IF stream lining
| From: | Shawn McKenzie | Date: | Thu, 14 Jul 2011 18:15:48 +0000 |
| Subject: | Re: IF stream lining | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-314076@lists.php.net to get a copy of this message | ||
On 07/13/2011 11:20 PM, Ron Piggott wrote:
>
> Is there a way to stream line this:
>
> if ( ( $val <> "with" ) AND ( $val <> "from" ) ) {
>
> Ron
>
> The Verse of the Day
> “Encouragement from God’s Word”
> http://www.TheVerseOfTheDay.info
>
Depends on what you mean by streamlined. If it were longer, this might
be useful:
if(!in_array($val,
array('with','from','to','against','mom','dad'))
{
--
Thanks!
-Shawn
http://www.spidean.com