diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-12-01 21:43:54 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-12-01 21:43:54 +0100 |
commit | fdb04592887bd9bb804ee63ac320d04fe0968a80 (patch) | |
tree | f3228e53a96eee6a5218f4b04a5949e54c62180b /include/text.php | |
parent | cded6b11366e15d6d4ac3eb6d9f86f4d0a60fa7c (diff) | |
parent | 6f22e47febdfb46494a0e1681e3eabdbd00fe72b (diff) | |
download | volse-hubzilla-fdb04592887bd9bb804ee63ac320d04fe0968a80.tar.gz volse-hubzilla-fdb04592887bd9bb804ee63ac320d04fe0968a80.tar.bz2 volse-hubzilla-fdb04592887bd9bb804ee63ac320d04fe0968a80.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/text.php b/include/text.php index 646bfe749..edd0f7a5a 100644 --- a/include/text.php +++ b/include/text.php @@ -3467,6 +3467,28 @@ function print_val($v) { } +function array_path_exists($str,$arr) { + + $ptr = $arr; + $search = explode('/', $str); + + if($search) { + foreach($search as $s) { + if(array_key_exists($s,$ptr)) { + $ptr = $ptr[$s]; + } + else { + return false; + } + } + return true; + } + + return false; + +} + + /** * @brief Generate a unique ID. * @@ -3482,3 +3504,4 @@ function new_uuid() { return $hash; } + |