note 85324 deleted from function.is-array by danbrown

From: Date: Sat, 27 Dec 2008 16:54:20 +0000
Subject: note 85324 deleted from function.is-array by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148575@lists.php.net to get a copy of this message
Note Submitter: Ilgar ---- I would change the latter example this way: function is_assoc($_array) { if (is_array($_array) == false) { return false; } foreach (array_keys($_array) as $k => $v) { if ($k !== $v || $_array[$k] !== $v) { return true; } } return false; }

« previous php.notes (#148575) next »