2017-07-02 26 views

回答

0

$itemOwners所有的「所有者」 s是一個數組。你需要重複使用它在foreach

<?php 

$itemOwners = json_decode(file_get_contents("https://www.brick-hill.com//API//serials?id=1937")); 

foreach ($itemOwners as $owner) { 
    echo $owner->owner; 
} 

?> 

此外,要知道,這不是有效的JSON。見here。似乎你在最後有一個逗號(在關閉]之前導致語法錯誤)

相關問題