Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/291.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在php中解析多对象json_Php_Arrays_Json_Object_Nested - Fatal编程技术网

在php中解析多对象json

在php中解析多对象json,php,arrays,json,object,nested,Php,Arrays,Json,Object,Nested,嘿,伙计们,我有下面的示例数据,我想用php解析它。您能告诉我如何在下面的数据中获得候选对象的“板块”和“信心”的每个值吗 $sample_data = [{"job_status": 3, "plates": {"data_type": "alpr_results", "epoch_time": 1430894595648, "img_height": 723, "img_width": 1280, "results": [{"plate": "RAC162R", "confidence":

嘿,伙计们,我有下面的示例数据,我想用php解析它。您能告诉我如何在下面的数据中获得候选对象的“板块”和“信心”的每个值吗

$sample_data = [{"job_status": 3, "plates": {"data_type": "alpr_results", "epoch_time": 1430894595648, "img_height": 723, "img_width": 1280, "results": [{"plate": "RAC162R", "confidence": 90.876228, "region_confidence": 0, "region": "", "plate_index": 0, "processing_time_ms": 38.729237, "candidates": [{"matches_template": 0, "plate": "RAC162R", "confidence": 90.876228}], "img_height": 723, "img_width": 1280}]';

提前感谢

非常简单,尝试使用
json\u解码($sample\u data)结果是php数组。

您尝试过什么吗?
json\u decode()
将解析json并根据需要生成数组或对象。从那里拿走。可能是复制品