note 14935 added to function.in-array.php
| From: | xidus at xidus dot net | Date: | Wed, 22 Aug 2001 00:16:54 +0000 |
| Subject: | note 14935 added to function.in-array.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16969@lists.php.net to get a copy of this message | ||
in_array chokes on arrays-of-arrays. IE:
$arr = array(array(1,2), array(3,4));
$key = array(1,2);
$q = in_array($key, $arr);
dies with 'wrong datatype for arg 1', which is silly.
http://www.php.net/manual/en/function.in-array.php