$doorRightShopJson = '[{
"name": "MoM\'s Touch",
"class": [
"素食"
],
"phone": [
"未提供//待搜集"
],
"Times": [
"午餐",
"晚餐"
],
"Drink":"另購",
"Soup":"無",
"SelfClean":"是",
"delivery":"不提供",
"MinCharge":"無",
"image":"無",
"menu":"無"
},{
"name": "馬來小館",
"class": [
"鍋燒",
"飯食"
],
"phone": [
"未提供/待搜集"
],
"Times": [
"午餐",
"晚餐"
],
"Drink":"另購",
"Soup":"無",
"SelfClean":"是",
"delivery":"不提供",
"MinCharge":"無",
"image":"無",
"menu":"無"
}]';
$doorRightShopData = json_decode($doorRightShopJson);
echo print_r($doorRightShopData);
echo "<br/>";
echo "<br/>";
echo "<br/>";
foreach($doorRightShopData as $data){
echo "店名:" . $data->name . "<br/>";
echo "飲食類型:";
foreach($data->class as $class){
echo $class . " ";
}
echo "<br/>";
echo "電話:";
foreach($data->phone as $phone){
echo $phone . " ";
}
echo "<br/>";
echo "營業時段:";
foreach($data->Times as $Times){
echo $Times . " ";
}
echo "<br/>";
echo "飲料:" . $data->Drink . "<br/>";
echo "湯品:" . $data->Soup . "<br/>";
echo "自行收拾:" . $data->SelfClean . "<br/>";
echo "提供外送:" . $data->delivery . "<br/>";
echo "最低消費:" . $data->MinCharge . "<br/>";
echo "圖片:" . $data->image . "<br/>";
echo "菜單:" . $data->menu . "<br/>";
echo "<br/>";
}