I have this output:
I don't have any idea how can I make my array look like this:
$array[
0 => [
'item_id' => 6,
'price' => "2311.00",
'qty' => 12,
'discount' => 0
],
1 => [
'item_id' => 7,
'price' => "1231.00",
'qty' => 1,
'discount' => 12
],
2 => [
'item_id' => 8,
'price' => "123896.00",
'qty' => 0,
'discount' => 24
]
]
I have started the loop but I don't really know how to get that kind of structure.
foreach( $array as $wishlist ){
foreach( $wishlist as $k => $v ){
}
}