"name": "热销",
"foods": [{
"name": "南瓜粥",
"price": 9.22,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/nanguaz.jpg'
}, {
"name": "小米粥",
"price": 9.8,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/xiaomi.jpg'
},
{
"name": "油条",
"price": 1.88,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}
]
},
{
"name": "折扣",
"foods": [{
"name": "油条1只",
"price": 1.88,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}, {
"name": "艇仔粥",
"price": 9.9,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/tingzaiz.jpg'
}],
},
{
"name": "套餐",
"foods": [{
"name": "油条2只",
"price": 1.88,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}, {
"name": "艇仔粥2",
"price": 9.9,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/tingzaiz.jpg'
}],
},
{
"name": "套餐2",
"foods": [{
"name": "油条3只",
"price": 1.88,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}, {
"name": "艇仔粥3",
"price": 9.9,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/tingzaiz.jpg'
}],
},
{
"name": "热销2",
"foods": [{
"name": "南瓜粥1",
"price": 9.22,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/nanguaz.jpg'
}, {
"name": "小米粥1",
"price": 9.8,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/xiaomi.jpg'
}]
},
{
"name": "折扣2",
"foods": [{
"name": "油条4只",
"price": 1.88,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}, {
"name": "艇仔粥4",
"price": 9.9,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/tingzaiz.jpg'
}],
},
{
"name": "套餐3",
"foods": [{
"name": "油条5只",
"price": 1.88,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}, {
"name": "艇仔粥5",
"price": 9.9,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/tingzaiz.jpg'
}],
},
{
"name": "套餐4",
"foods": [{
"name": "油条6只",
"price": 1.81,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}, {
"name": "艇仔粥6",
"price": 9.91,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/tingzaiz.jpg'
}],
},
{
"name": "热销3",
"foods": [{
"name": "南瓜粥3",
"price": 9.21,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/nanguaz.jpg'
}, {
"name": "小米粥3",
"price": 9.78,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/xiaomi.jpg'
}]
},
{
"name": "折扣3",
"foods": [{
"name": "油条7只",
"price": 1.88,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}, {
"name": "艇仔粥7",
"price": 9.9,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/tingzaiz.jpg'
}],
},
{
"name": "套餐6",
"foods": [{
"name": "油条8只",
"price": 1.88,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}, {
"name": "艇仔粥8",
"price": 9.9,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/tingzaiz.jpg'
}],
},
{
"name": "套餐7",
"foods": [{
"name": "油条9只",
"price": 1.88,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}, {
"name": "艇仔粥9",
"price": 9.9,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/tingzaiz.jpg'
}],
},
{
"name": "热销4",
"foods": [{
"name": "南瓜粥4",
"price": 9.22,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/nanguaz.jpg'
}, {
"name": "小米粥4",
"price": 9.8,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/xiaomi.jpg'
}]
},
{
"name": "折扣4",
"foods": [{
"name": "油条10只",
"price": 1.88,
"oldPrice": "",
"desc
"sellCount": 229,
"img": '../../static/youtiao.jpg'
}, {
"name": "艇仔粥10",
"price": 9.9,
"oldPrice": "",
"desc
"sellCount": 239,
"img": '../../static/tingzaiz.jpg'
}],
},
]
我需要动态的这样格式数据, 大神们 PHP怎么写出这个格式
最佳答案