Check if something is an associative array
Note: this method only checks the key of the first value in the array.
mixed $param The variable to check:
bool true if the variable is an associative array
public static function isAssociativeArray($param) {
if (is_array($param)) {
$keys = array_keys($param);
if ($keys[0] === 0) {
return false;
}
else {
return true;
}
}
else {
return false;
}
}