Re: selected index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 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.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux