<?php
$content = '{"ORDERLIST":"{\"ORDER_LIST\":[{\"order_id\":\"1755\",\"uname\":\"jordan\",\"prod_name\":\"ABC\",\"quantity\":\"1\",\"branch\":\"Dapitan\",\"totalPrice\":\"23500\"},{\"order_id\":\"1755\",\"uname\":\"jordan\",\"prod_name\":\"AMD Kaveri A4-7300 APU HD8470D 2-Core 2GB 500GB CPU Package\",\"quantity\":\"1\",\"branch\":\"Dapitan\",\"totalPrice\":\"23500\"}]}"}';
$response = json_decode($content, true);
$orderlist = json_decode($response['ORDERLIST'], true);
//var_dump($orderlist);
count(var_export($orderlist));
foreach($orderlist AS $row){
echo $row[0]['order_id'];
echo $row[0]['uname'];
echo $row[0]['prod_name'];
echo $row[0]['quantity'];
echo $row[0]['branch'];
echo $row[0]['totalPrice'];
}
preferences:
44.74 ms | 402 KiB | 5 Q