In a message dated 7/31/01 12:32:59 AM Eastern Daylight Time, 
[EMAIL PROTECTED] writes:


> How do I search an array? 
> 
> For example if I want to know if $array contains "1"...
> 
> Regards,
> 
> Matthew Delmarter
> 

for ($i = 0; $i < count($array); $i++)
{
    if ($array[$i] == 1) {
            //do something
            exit;
    }
}

Reply via email to