如何获取json元素';的属性


How to get json element's property from Entire Json in PHP

我的json值如下所示:

[{"Id":"1169"},{"Id":"1164"},{"Id":"1163"},{"Id":"1162"},{"Id":"1161"}]

现在我只想将数值11691164116311621161存储到不同的数组中。我该怎么做?

简单

    $values = array_values(json_decode($json,true));

its不是数组,而是json。

您可以从array更改为json,从json更改为array。

$a = json_encode($yourArray);

$b= json_decode($yourJson);