summaryrefslogtreecommitdiff
path: root/program/include/rcube_shared.inc
diff options
context:
space:
mode:
Diffstat (limited to 'program/include/rcube_shared.inc')
-rw-r--r--program/include/rcube_shared.inc20
1 files changed, 20 insertions, 0 deletions
diff --git a/program/include/rcube_shared.inc b/program/include/rcube_shared.inc
index f4f23a26b..a130391f7 100644
--- a/program/include/rcube_shared.inc
+++ b/program/include/rcube_shared.inc
@@ -608,6 +608,26 @@ function rcube_explode_quoted_string($delimiter, $string)
/**
+ * Get all keys from array (recursive)
+ *
+ * @param array Input array
+ * @return array
+ */
+function array_keys_recursive($array)
+{
+ $keys = array();
+
+ if (!empty($array))
+ foreach ($array as $key => $child) {
+ $keys[] = $key;
+ if ($children = array_keys_recursive($child))
+ $keys = array_merge($keys, $children);
+ }
+ return $keys;
+}
+
+
+/**
* mbstring replacement functions
*/