mardi 5 mai 2015

Json decoding and displaying in php

So i've got a list with local weather details, http://ift.tt/1GXZvLR. And I want to display some of that in formation via php on my site, but can't really find out how JSON is something completely new for me.

And the only thing i managed to do right now is this: http://ift.tt/1cjXtLO. So this is a simple script:

$getData = file_get_contents( "http://ift.tt/1GXZvLR");
 
$decode = json_decode($getData);
 
echo "<pre>";
print_r($decode);

Hopefully someone can help me with this, and explain why certain thing are that way so I don't only know how to copy / paste it but also can do it myself! Sorry for any grammarmistakes but english is not my native! Thanks everybody!

Aucun commentaire:

Enregistrer un commentaire