note 108926 added to function.is-array
| From: | michael dot fielding at hawkip dot com | Date: | Wed, 06 Jun 2012 03:42:58 +0000 |
| Subject: | note 108926 added to function.is-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-188413@lists.php.net to get a copy of this message | ||
magnetix's method doesn't work for this case:
is_assoc( array(0=>'x', 2=>'y') ); // returns false
This is because it doesn't check that the keys are contiguous or even monotonic, only than
they're non-numeric (i.e. string).
----
Server IP: 69.147.83.197
Probable Submitter: 121.72.145.41
----
Manual Page -- http://www.php.net/manual/en/function.is-array.php
Edit -- https://master.php.net/note/edit/108926
Del: integrated -- https://master.php.net/note/delete/108926/integrated
Del: useless -- https://master.php.net/note/delete/108926/useless
Del: bad code -- https://master.php.net/note/delete/108926/bad+code
Del: spam -- https://master.php.net/note/delete/108926/spam
Del: non-english -- https://master.php.net/note/delete/108926/non-english
Del: in docs -- https://master.php.net/note/delete/108926/in+docs
Del: other reasons-- https://master.php.net/note/delete/108926
Reject -- https://master.php.net/note/reject/108926
Search -- https://master.php.net/manage/user-notes.php