From: [EMAIL PROTECTED]
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
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]