From e9b2ca7c06875069fa03379258625490872cc33d Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Tue, 31 Jul 2018 18:29:53 +0200 Subject: W 2.4 graphic update table sort engine update --- fn/fn.php | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'fn/fn.php') diff --git a/fn/fn.php b/fn/fn.php index ce299c8..f3b87aa 100644 --- a/fn/fn.php +++ b/fn/fn.php @@ -99,5 +99,40 @@ function hrdi(DateInterval $diff) } + +function arrayclean($input) +{ + $output = []; + foreach ($input as $key => $value) { + if (is_array($value)) { + $output[$key] = array_filter($value); + } else { + $output[$key] = $value; + } + } + return $output; +} + + + + +function array_update($base, $new) +{ + foreach ($base as $key => $value) { + if (array_key_exists($key, $new)) { + if (gettype($base[$key]) == gettype($new[$key])) { + $base[$key] = $new[$key]; + } + } + } + return $base; +} + + + + + + + ?> -- cgit v1.2.3