From f923d21df341546e054eb0f9628891365c4c2d62 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 25 Apr 2018 18:41:19 -0700 Subject: some tagging work --- include/text.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/text.php') diff --git a/include/text.php b/include/text.php index 60f6ff383..645c15df0 100644 --- a/include/text.php +++ b/include/text.php @@ -3402,3 +3402,18 @@ function unpunify($s) { } + +function unique_multidim_array($array, $key) { + $temp_array = array(); + $i = 0; + $key_array = array(); + + foreach($array as $val) { + if (!in_array($val[$key], $key_array)) { + $key_array[$i] = $val[$key]; + $temp_array[$i] = $val; + } + $i++; + } + return $temp_array; +} \ No newline at end of file -- cgit v1.2.3