I have an array that looks like this:
$fruit = array(\'apple\',\'orange\',\'grape\');
How can I find the index of a specific item, in the a
have in mind that, if you think that your search item can be found more than once, you should use array_keys() because it will return keys for all matching values, not only the first matching key as array_search().
Regards.