#19920 [Com]: Not a bug, but an add-on...

From: Date: Tue, 15 Oct 2002 19:15:42 +0000
Subject: #19920 [Com]: Not a bug, but an add-on...
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-22510@lists.php.net to get a copy of this message
 ID:               19920
 Comment by:       webmaster@tsn.dk
 Reported By:      meggleston@matrixreg.com
 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] meggleston@matrixreg.com

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



Thread (3 messages)

« previous php.bugs (#22510) next »