Re: selected index
| From: | Al | Date: | Tue, 25 Oct 2005 12:54:46 +0000 |
| Subject: | Re: selected index | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-224625@lists.php.net to get a copy of this message | ||
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, RossIt appears you are learning php. I suggest that you will find it very rewarding to learn the array functions. I certainly did when I first started work with php. There is an array function that does exactly what you want.