ID:               19920
 Comment by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
 Status:           Open
 Bug Type:         Feature/Change Request
 Operating System: RedHat Linux 7.2
 PHP Version:      4.2.0
 New Comment:

Maybe you should add it as a comment to array_search in the manual?


Previous Comments:
------------------------------------------------------------------------

[2002-10-15 12:25:14] [EMAIL PROTECTED]

I have a small snippit of code that I believe people would find very
useful, however I was unsure as to where to stick it.

function array_multisearch($needle, $haystack, $strict = FALSE) {
        for ($x = 0; $x < count($haystack); $x++) {
                if (array_search($needle, $haystack[$x], $strict)) {return $x;}
        }
}

This function allows for arrays of hash-arrays kind of searching...

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19920&edit=1

Reply via email to