how can I select the number of "total_items" and the "average_price"?
JSON:
{
"status" : "success",
"data" : {
"items" : [
{
"market_hash_name" : "AK-47 | Redline (Field-Tested)",
"total_items" : 698,
"lowest_price" : "3.90",
"highest_price" : "300.00",
"cumulative_price" : "4669.62",
"recent_sales_info" : {
"hours" : "17.94",
"average_price" : "4.23"
}
}
]
}
}
Thats my PHP-Script:
$link = 'skin.json';
$string = file_get_contents($link);
$obj = json_decode($string, TRUE);
$name = $obj['items']['market_hash_name'];
$itmes = $name['total_items'];
$itmes = $name['average_price'];
How can I save the number of "total_items" and the "average_price" in variables? Thank You Regards. Enge