+// $array[0] => $array['name']
+function array_rename_key(& $array, $from, $to, $force = FALSE, $default = '')
+{
+ if (isset($array[$from])) {
+ $array[$to] = & $array[$from];
+ unset($array[$from]);
+ } else if ($force) {
+ $array[$to] = $default;
+ } else {
+ return FALSE;
+ }
+ return TRUE;
+}
+