在获取 highlight_description 时遇到问题。我想回应highlights_title 和highlights_decription。这是数组
{
"highlights_title": [
"Quiet Neighbourhood",
"Fabulous views",
"Great local community",
"Large play center in yard"
],
"highlights_description": [
"Enjoy tranquil and relaxed atmosphere of the place",
"Get yourself surrounded by the stunning view opening",
"You will be delighted by the fantastic local community",
"Your kids will be happy having all these things around"
]
}
这是我的代码,它只显示亮点标题。如何同时回显 highlighttitle 和 highlightdescription
$data = "{"title":"Property Highlights","description":"Extensive upgrades and thorough maintenance have kept this home in prime condition. Hardwood floors and new carpets create a very comfortable living space.","content":"{\"highlights_title\":[\"Quiet Neighbourhood\",\"Fabulous views\",\"Great local community\",\"Large play center in yard\"],\"highlights_description\":[\"Enjoy tranquil and relaxed atmosphere of the place\",\"Get yourself surrounded by the stunning view opening\",\"You will be delighted by the fantastic local community\",\"Your kids will be happy having all these things around\"]}","module_tag":"div","bootstrap_size":"0","header_tag":"h3","header_class":"","style":"0"}"
$highlights = json_decode($data, true);
if(!empty($highlights)){
$content = $highlights['highlight_stitle'];
array_walk($content, function($value){
echo $value .'<br/>';
});
}
神不在的星期二
精慕HU