php - How extract information using json from api -
i have api :
{"id":[{"name":"tuos","tier":"v","queue":"solo"}]} and need extract "tier" value it, got code :
$result = file_get_contents('url link here'); $tier = json_decode($result); echo $tier->id->tier; what need correct in code ? , wrong ?
that value in array (id array noted bracket syntax):
echo $tier->id[0]->tier;
Comments
Post a Comment