ID: 12741
Updated by: andrei
Reported By: [EMAIL PROTECTED]
Old Status: Assigned
Status: Closed
Bug Type: Feature/Change Request
Operating System: Linux 2.2
PHP Version: 4.0.5
Assigned To: andrei
New Comment:

Implemented in CVS.

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

[2001-08-14 11:12:20] [EMAIL PROTECTED]

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 this 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]

Reply via email to