|
Posted by Anirudh Dutt on 03/17/05 14:58
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@redry.net> 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
Navigation:
[Reply to this message]
|