aboutsummaryrefslogtreecommitdiff
path: root/w/fn/w.fn.php
diff options
context:
space:
mode:
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