how to change key with value in array php code example Example: change key with the value php $arr[$newkey] = $arr[$oldkey]; unset($arr[$oldkey]);