How to extract $data array from this function?
function kv_euro() { $path = CACHE_DIR . 'weather_' . weather_city('city') . '.json'; $json = get_cache_value($path); if (false !== $json) { echo ""; $data = json_decode($json); //echo $json; } else { $BASE_URL = "http://api.openweathermap.org/data/2.5/forecast/daily"; //city //$yql_query = 'select * from weather.forecast where woeid="' . weather_city('id') . '"'; $yql_query_url = $BASE_URL . "?id=" . weather_city('id') . "&APPID=9e2227183d6b7351f6942dbaac4d24af"; // Make call with cURL $session = curl_init($yql_query_url); curl_setopt($session, CURLOPT_RETURNTRANSFER, true); $json = curl_exec($session); $data = json_decode($json); set_cache_value($path, $json); } } I put return $data , but I can't see it all the same.
<?php print_r($data) ?>
<?php print_r(kv_euro()) ?>andreturn $data- Grundy