aboutsummaryrefslogtreecommitdiff
path: root/w/fn/w.fn.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-10-31 15:28:37 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-10-31 15:28:37 +0100
commit26f88e043ebedcadd337011ce527f6148350f0dc (patch)
treeb41d1c9dd646c35a2cac88ba999b0cdd35726a68 /w/fn/w.fn.php
parente17392e46259e6f2e012017987cf7c31c171488f (diff)
downloadwcms-26f88e043ebedcadd337011ce527f6148350f0dc.tar.gz
wcms-26f88e043ebedcadd337011ce527f6148350f0dc.zip
homemade very root database engine
Diffstat (limited to 'w/fn/w.fn.php')
-rw-r--r--w/fn/w.fn.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/w/fn/w.fn.php b/w/fn/w.fn.php
index 558ae67..8bfdee8 100644
--- a/w/fn/w.fn.php
+++ b/w/fn/w.fn.php
@@ -138,4 +138,18 @@ function str_clean(string $string)
+function changekey($array, $oldkey, $newkey)
+{
+ if (!array_key_exists($oldkey, $array))
+ return $array;
+
+ $keys = array_keys($array);
+ $keys[array_search($oldkey, $keys)] = $newkey;
+
+ return array_combine($keys, $array);
+}
+
+
+
+
?> \ No newline at end of file