Reply to Re: [PHP] multiple OR's

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация