PHP Aray_search multiple function ?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have an array like:
7 => 'suppr'
15 => 'suppr'
22 => 'suppr'
39 => 'suppr'

With an array_search on 'suppr', I only get '7'. I can not find the
function for getting an array like:
0 => 7
1 => 15
2 => 22
3 => 39
Did I miss it, or is it simply that it does not exist ?

Aphrael, desesperate...
"La demande mondiale d’ordinateurs n’excédera pas cinq machines."
(Thomas Watson, Fondateur d'IBM, 1945)

Re: PHP Aray_search multiple function ?

contained the following:

Quoted text here. Click to load it

You missed it.

From the fine manual:

If needle is found in haystack more than once, the first matching key is
returned. To return the keys for all matching values, use array_keys()
with the optional search_value parameter instead.

Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs /

Site Timeline