I have $monTab, an array with nested arrays like this in php :
array (size=12)
0 =>
array (size=2)
'mon' => string '2018-01-01 00:00:00' (length=19)
'nb_argus' => string '29' (length=2)
1 =>
array (size=2)
'mon' => string '2018-02-01 00:00:00' (length=19)
'nb_argus' => string '21' (length=2)
2 =>
I am simply trying to add this new pair of key value to each of the nested arrays :
'tx' => int '50' (length=2)
So i've built a for each like that :
foreach($monTab as $item) {
$item["tx"] = 50;
}
It doesnt work at all, var_dump($monTab) shows that nothing has happened !
the tx key is not added at all, the value is not added at all to my arrays !!