code:
```
foreach($array_for_values as $k => &$val){
$newVal = $empty_dates;
foreach($val['data'] as $key => $value){
$newVal[$key] = $value;
}
$val['data'] = $newVal;
$removedIndexArray = array();
// flag 1
foreach ($val['data'] as $v){
$removedIndexArray[] = $v;
}
// flag 1 ENDING
$val['data'] = $removedIndexArray;
}
var_dump($array_for_values);
```
before the foreach the array is fine, but after the array it's not. flag 1 is when I remove the associative indexes from the array, because the result needs to be an unassociated array.