Re: If in an array
| From: | Cynic | Date: | Fri, 15 Dec 2000 17:36:34 +0000 |
| Subject: | Re: If in an array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-30548@lists.php.net to get a copy of this message | ||
have a look at in_array()
At 20:18 14.12. 2000, Brandon Orther wrote the following:
--------------------------------------------------------------
>Is there a way to check the value of a string against anything in an array
>without using the do loop?
>
>Like:
>If ($variable == $array(anything in array)) {
>$variable2 = "Yes it worked";
>}
>
>Thank you,
>
>--------------------------------------------
>Brandon Orther
>WebIntellects Design/Development Manager
>brandon@webintellects.com
>800-994-6364
>www.webintellects.com
>--------------------------------------------
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
>For additional commands, e-mail: php-general-help@lists.php.net
>To contact the list administrators, e-mail: php-list-admin@lists.php.net
------end of quote------
____________________________________________________________
Cynic:
A member of a group of ancient Greek philosophers who taught
that virtue constitutes happiness and that self control is
the essential part of virtue.
cynic@mail.cz
ICQ: 2808 2505