$i = 3;
$array[$i] = $new_value;