Replace keys in an array based on another lookup/mapping array

$arr[$newkey] = $arr[$oldkey];
unset($arr[$oldkey]);

Leave a Comment