Re: multiple OR's

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

 



and if u've got several checks for just $name, u could use in_array
(http://php.net/in_array).

if (in_array($name, array('andrea', 'john', 'jane')))

it's case sensitive so if the array has all lower-case letters, u
might wanna use strtolower (http://php.net/strtolower) on $name.

for general cases of OR...
On Thu, 17 Mar 2005 12:32:20 +0000, eoghan <php@xxxxxxxxx> wrote:
> can do:
> if ($name==andrea || $name==john)
> 
> On 17 Mar 2005, at 11:59, AndreaD wrote:
> > if ($name==andrea) OR ($name==john)

-- 
]#
Anirudh Dutt


...pilot of the storm who leaves no trace
like thoughts inside a dream

-- 
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