note 98841 deleted from function.is-array by danbrown
| From: | danbrown@php.net | Date: | Sat, 10 Jul 2010 13:11:59 +0000 |
| Subject: | note 98841 deleted from function.is-array by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-170859@lists.php.net to get a copy of this message | ||
Note Submitter: alex00888 at gmail dot com
----
I think this will be better:
<?php
function is_assoc($array) {
return (is_array($array) && (count($array)==0 || 0 !== count(array_diff_key($array,
array_values($array)) )));
}
?>