How can I display all the values of a JSON in PHP ??
I'll give you an example, I use the Code below to request the JSON
$json_file = file_get_contents("http://backpack.tf/api/IGetUsers/v3/?steamids=76561198012598620");The information contained in JSON are these:
$json_str = json_decode($json_file, true);
{ "response": { "success": 1, "current_time": 1400075229, "players": { "76561198012598620": { "steamid": "76561198012598620", "success": 1, "backpack_value": { "570": 5, "440": 126.9475 }, "backpack_update": { "570": 1399815523, "440": 1400024876 }, "name": "Fiskie", "backpack_tf_reputation": 2, "notifications": 0 } } } }But if I use
$nome = $json_str["name"]; echo "$nome";To display the value "name" the page does not seem to load, the whole screen turns white ..
How can I display the value "name" correctly?
Thanks to all who can help me.