I have this function:
function map(){
$address = mashhad; // Google HQ
$prepAddr = str_replace(' ','+',$address);
$geocode=file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$prepAddr.'&sensor=false');
$output= json_decode($geocode);
$latitude = $output->results[0]->geometry->location->lat;
$longitude = $output->results[0]->geometry->location->lng;
$ogt=owghat($month , $day , $longitude , $latitude , 0 , 1 , 0);
}
and i need to use form $ogt in another function,is it possible that declared ogt as a public variable and if it possible how can i do that?