[ 'value' => '', 'text' => 'Tout afficher'], false => [ 'value' => 'true', 'text' => 'Afficher la sélection'], ]; /* Fetching velov API in an associative array. This form is easier to use as keys are ids */ $data = json_decode( file_get_contents( 'https://velov.grandlyon.com/fr/les-stations.html?type=777&tx_glstationsvelov_pi1%5Baction%5D=listOfVelovWidthInfoStation&tx_glstationsvelov_pi1%5Bcontroller%5D=StationVelov', false, stream_context_create([ 'http' => [ 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query([]) ] ]) ), true ); /* Check if a filter is enabled */ if(isset($_GET['filter'])){ if(htmlentities($_GET['filter'])) $filter = true; else $filter = false; }else $filter = false; ?>