To all guru
how can i compare a single variable to a array , most likely i want to identify if the name is a female or name
$femalename=array("sofia","silvia","rosalina","ana","sandra","paula","margarita","maria");
$nameattached = strtolower("Sandra Sofia Rebelo");
so far this is the code that i created and i have lots of data
foreach($femalename as $female)
{
if (eregi($female,$nameattached ))
{ echo "found"; } else { echo "not found";}
}
my code is most likely working but is there any shortcut aside ?
sorry for my bad english
thanks