Update variable each time that variable is updated

0

I am consulting data from an api using PHP, where I want the $ climate variable to be automatically changed, when it no longer has the same value as before, and that the climate variable is shown already updated, all this without updating the whole page, only the climate variable.

$url ="";
$json = file_get_contents($url);
$clima =  json_decode($clima,true);

//var_dump($ticker);
echo "Libro";
?><br><?
echo $clima['clima'][0]['grados'];
    
asked by RAIC3R 15.09.2018 в 07:05
source

1 answer

-1

setInterval (function_refresh ((), 30000); // every 30 seconds

    
answered by 16.09.2018 / 03:42
source