Bug #12741: Array needle support for array search

From: Date: Tue, 14 Aug 2001 15:12:20 +0000
Subject: Bug #12741: Array needle support for array search
Groups: php.dev 
Request: Send a blank email to php-dev+get-63167@lists.php.net to get a copy of this message
From: nathan@cjhunter.com Operating system: Linux 2.2 PHP version: 4.0.5 PHP Bug Type: Feature/Change Request Bug description: Array needle support for array search I am requesting that the functions in_array and array_search support an array type for their needle arguments. This feature would allow these functions to search for an array in an array of arrays. i.e. <? $needle = array(3,4); $haystack = array( array(1,2), array(3,4), array(5,6) ); if(in_array($needle, $haystack)){ echo "Yes"; }else{ echo "No"; } ?> Outputs: Warning: Wrong datatype for first argument in call to in_array in test.phtml -- Edit bug report at: http://bugs.php.net/?id=12741&edit=1

« previous php.dev (#63167) next »