Using Arrays in PHP it's very simple, but i'ts very difficult to get solution for this issue, here listed the coding to get the key values from given Array values.
$vSearchStr = "hi";
$Array = array("hello","hi mathew");
$Search=array();
foreach($Array as $key => $value)
{
if(ereg($vSearchStr,$value))
{
$Search[$key]=$value;
}
}
print_r($key);
i think it's very useful for you
__________________ Thanks & Regards
Sabari...
Last edited by Sabari : 08-21-2007 at 09:49 PM.
|