change the name of all the keys in array code example Example: change key with the value php $arr[$newkey] = $arr[$oldkey]; unset($arr[$oldkey]);