📜  php 循环遍历 json - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:49.953000             🧑  作者: Mango

代码示例1
$arr = json_decode('[{"var1":"9","var2":"16","var3":"16"},{"var1":"8","var2":"15","var3":"15"}]');

foreach($arr as $item) { //foreach element in $arr
    $uses = $item['var1']; //etc
}