DEV Community

mhsohag11
mhsohag11

Posted on

Answer: In PHP, how do you change the key of an array element?

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

Top comments (0)