Just looking at the manual here and it explains quite specifically that array_search() is meant to be used with associative arrays, not indexed arrays. I think the best way to do what you want is to do is to set up a loop and test each index against eregi(); If true then you know your index. -Kevin
----- Original Message ----- From: "andy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, April 25, 2002 10:30 AM Subject: [PHP] how to make array_search start from 0? > Hi there, > > I am passing an array through the URL with a ',' inbetween: > var=php,mysql,super > Parsing is done with: explode (',',$var). This gives me an array starting > with 0 > > Later on I have to search for lets say php with array_search. > > Unfortunatelly array_search requires an array starting with 1. So php is not > found. > > Does anybody know a workaround for this? > > Thanx, > > Andy > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php