summaryrefslogtreecommitdiffstats
path: root/lib/kolab_utils.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kolab_utils.php')
-rw-r--r--lib/kolab_utils.php9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/kolab_utils.php b/lib/kolab_utils.php
index 2694f71..b80bc6a 100644
--- a/lib/kolab_utils.php
+++ b/lib/kolab_utils.php
@@ -142,4 +142,13 @@ class kolab_utils
return false;
}
+
+ /**
+ * Finds wether an array is associative or not.
+ */
+ public static function is_assoc ($arr)
+ {
+ return is_array($arr) && count(array_filter(array_keys($arr), 'is_string')) == count($arr);
+ }
+
}