Re: "searching" arrays
| From: | Evan Nemerson | Date: | Wed, 15 Aug 2001 02:43:38 +0000 |
| Subject: | Re: "searching" arrays | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62734@lists.php.net to get a copy of this message | ||
Try something like this
if(isset($countries["singapore"])) { do something... };
or, alternatively, if(!isset($countries["singapore"])) { echo "Not a country"
};
On Tuesday 14 August 2001 19:12, you wrote:
> Hi,
>
> Is there a possibility to search arrays in PHP? For example I'd like to
> find out the index-number of
>
> $countries["singapore"];
>
> but only if that country exists in the array.
>
> TIA,
>
> Raphael