I need a JS array of PHP arrays, specifically formatted, like this:
products = [{}, {}, {}]
I have been google for 2 days and trying to use php function json_encode, but it doesn't give me format I'm looking for. I'm getting this:
Array
(
[0] => Array
(
[id] => 3971
[name] => Test
[price] => 1107.9000
[brand] => KM
[variant] =>
[quantity] => 3.27
)
[1] => Array
(
[id] => 3957
[name] => Test
[price] => 87.3000
[brand] => KM
[variant] =>
[quantity] => 4
)
)
Sorry for dumb duplicated question.