- json_decode: documentation ( source)
<?php
$content = '{"ORDERLIST":"{\"ORDER_LIST\":[{\"order_id\":\"1755\",\"uname\":\"jordan\",\"prod_name\":\"ABC\",\"quantity\":\"1\",\"branch\":\"Dapitan\",\"totalPrice\":\"23500\"]}"}';
$response = json_decode($content, true);
$orderlist = json_decode($response['ORDERLIST'], true);
//var_dump($orderlist);
//count(var_export($orderlist));
$count = count($orderlist);
echo "Count: $count";
//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'];
//}