For example the array (0) in data tiene {3:1.30}
what I want to do is fill in the positions (0,1,2) with the value of 0. It is say that it is in%% data_of%.
For example the array (1) in {0:0,1:0,2:0,3:1.30}
what I want to do is fill the positions (1) with the value of 0. That is to say that it is in data data tiene {0:0.31,2:0.74,3:0.69}
.
What I did was this but nothing comes out, it does not add the values it stays the same
foreach ($causales as $row_causales){
foreach ($row_causales['data'] as $key => $row_data ){
for ($j=0;$j<=3;$j++){
if($i!==$key){
$causales[$i]['data'][$j] = 0;
}
}
}
$i++;
}