Here is array #1
Array
(
[0] => Array
(
[first] => LightSpeed
[last] => Administrator
)
[1] => Array
(
[first] => Tyler
[last] => Nichol
)
Here is array #2
Array
(
[I-10] => Array
(
[user] => 2
[total] => 46.64
)
[I-11] => Array
(
[user] => 2
[total] => -46.64
)
I just want to add [total] => $value to the first array so it looks like.
Array
(
[0] => Array
(
[first] => LightSpeed
[last] => Administrator
[total] => 46.64
)
[1] => Array
(
[first] => Tyler
[last] => Nichol
[total] => -46.64
)
Pretty sure it is array_push but not sure how to loop it. Any suggestions? Thanks!
It’s a bit low tech, but I’d just loop through your array and insert the total item. Assuming you’re just matching to the second array on the position of the items in the arrays: