是想要取出 age、beauty和 face_type 的值吗?
$oriArr = Array
(
[error_code] => 0
[error_msg] => SUCCESS
[log_id] => 7.4795696152086E+17
[timestamp] => 1546152086
[cached] => 0
[result] => Array
(
[face_num] => 1
[face_list] => Array
(
[0] => Array
(
[face_token] => ad9d8f7127761e5b2f8dcb37b0fe5afb
[location] => Array
(
[left] => 67.22
[top] => 107.6
[width] => 124
[height] => 127
[rotation] => -1
)
[face_probability] => 1
[angle] => Array
(
[yaw] => 7.16
[pitch] => 0.38
[roll] => -3.84
)
[age] => 28
[beauty] => 62.27
[face_type] => Array
(
[type] => human
[probability] => 1
)
)
)
)
)
$result = $oriArr['result']['face_list'][0];
$age = $result['age'];
$beauty = $result['beauty'];
$faceType = $result['face_type'];
如果想要 face_type 里面的值,按上面的格式,用中括号获取就好了。
望采纳,谢谢