What am I doing wrong here? It's so simple and I'm overlooking something. I'm trying to replace the value of an array key within a foreach loop:
$arr = array();
$arr['firstimg'] = '123';
$arr['secondimg'] = '456';
$arr['thirdimg'] = '789';
foreach ($arr as $key => $value) {
if ($key == 'secondimg') {
$value = '000';
}
}
print_r($arr);
The array is staying the same.