http://pastebin.com/FE2i1sqV – this is the json data file…
This is the code I use to print my city which is in json file on linenum:20
$json_string = file_get_contents("path/to/json");
$parsed_json = json_decode($json_string);
$location = $parsed_json->{'location'}->{'city'};
echo "${location}\n";
Now I’m having problems on how to print out content from the “forecast” array which is located on linenum 154 of the JSON file. Basically I need an outpout from content where period is 0, 1 and 2.
I just need a working example of one row – I can figure out the rest on my own – How else am I to learn if everyone solves everything for me 🙂
Thnx in advance 😛
Something like this?