Get the index value of an array in php
- by Aakash Chakravarthy
Hello,
I have array
$list = array('string1', 'string2', 'string3');
Now i want to get the index of the value string2 i.e 1 and 2 for string3
All i want is the position of the strings in the array
string1 in 0
string2 in 1
string3 in 2
positions
How to get this ? i used array_search but it is no use !
please help !