From b2f0d2d085c355010f1475269c4beb4fba7b07dc Mon Sep 17 00:00:00 2001 From: redmatrix Date: Fri, 20 May 2016 17:44:26 -0700 Subject: cleanup proc_run after messing it up with debugging yesterday --- include/smarty.php | 5 +++-- include/text.php | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/smarty.php b/include/smarty.php index 762efe335..9d443e269 100755 --- a/include/smarty.php +++ b/include/smarty.php @@ -1,6 +1,7 @@ foo [1] => bar [2] => baz [3] => blip [4] => zob [5] => glob [6] => grip ) + * + */ + +function flatten_array_recursive($arr) { + $ret = array(); + + if(! $arr) + return $ret; + + foreach($arr as $a) { + if(is_array($a)) { + $tmp = flatten_array_recursive($a); + if($tmp) { + $ret = array_merge($ret,$tmp); + } + } + elseif($a) { + $ret[] = $a; + } + } + return($ret); +} -- cgit v1.2.3