Created
January 31, 2009 22:54
-
-
Save shadowhand/55693 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') OR die('No direct access allowed.'); | |
class arr extends arr_Core { | |
public static function is_assoc(array $array) | |
{ | |
// Keys of the array | |
$keys = array_keys($array); | |
// If the array keys of the keys match the keys, then the array must | |
// be associative. | |
return array_keys($keys) !== $keys; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment