當前位置:成語大全網 - 書法字典 - PHP如何快速檢索JSON的指定鍵值?

PHP如何快速檢索JSON的指定鍵值?

$json_str?=?[{"a":1," b":2," c":3},{"a":4," b":5," c":6},{"a":7," b":8," c ":9 }]';

$arr?=?json_decode($json_str?,?真);

foreach($arr?作為?$v){

if($v['a']?==?1){

回聲?$ v[' c '];

}

}