<?php //$json = file_get_contents("cotation_bourse.json"); $json = file_get_contents("http://data.nantes.fr/api/getDisponibiliteParkingsPublics/1.0/39W9VSNCSASEOGV/?output=json"); $p_json = json_decode($json); $test = $p_json->{'opendata'}->{'request'}; //var_dump($p_json->{'opendata'}->{'answer'}->{'data'}->{'Groupes_Parking'}->{'Groupe_Parking'}); foreach($p_json->{'opendata'}->{'answer'}->{'data'}->{'Groupes_Parking'}->{'Groupe_Parking'} as $k=>$v) { foreach($v as $k2=>$v2) { echo $k2."=>".$v2."<br/>" ; } echo "-------------------------</br>" ; } //var_dump(json_decode($json, true)); //print_r($parsed_json->{'opendata'}); //echo prettyPrint(prettyPrint($json)); //echo json_encode($json, JSON_PRETTY_PRINT); ?>