[PHP] Re: selected index

2005-10-25 Thread Al
Ross wrote: Hi, I have an array $people= array ("ross", "bob", "chris") I have a variable $selected_person = "chris" I want to do the find out the index of the $selected_person in the $people array. Is there a function that can do this?? ta, Ross It appears you are learning php. I

[PHP] Re: selected index

2005-10-25 Thread Rosty Kerei
try array_search() Sincerely, Rosty Kerei <[EMAIL PROTECTED]> ""Ross"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > > I have an array > > $people= array ("ross", "bob", "chris") > I have a variable > > $selected_person = "chris" > > > > I want to do the find out the index