Skip to content
Advertisement

how to push data object to array of object in php

i have data array nested in hire , how to push new value to array [‘data’] ? The data I have is an object and I want to insert the data into each array

JavaScript

result

JavaScript

AND this my code

JavaScript

i have code

JavaScript

I have a data object that I want to insert into [‘data’] How to do it

Advertisement

Answer

I assume $i is array of arrays, so do array_push($i, $win) (or $i[] = $win)

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement