playing around with the Raw Data, problems with 'weather' groups
Brought to you by:
iridium
From: Sifu R. <php...@ha...> - 2003-10-10 19:27:04
|
Hi, php newbie here.... downloaded and installed phpweather 2.1.2 today with no problems at all.... trying to pick thru the Raw Data to write a super simple PHP script that simply returns weather and temperature info to me. I've figured how to get it to give me back things like location and temperature from reading thru some of the posts in the Archives... but can not figure out the 'weather' thing. i went thru the user and reference guide, but still dont understand what it means to have an "array of weather groups". What are these "groups"? They're not like arrays, right? So far I've been able to get the location and weather from the code below: $weather = new phpweather(); $data = $weather->decode_metar(); $location = $weather->get_location(); $temp = $data['temperature']['temp_c']; I've been trying to do this to get the weather's descriptor, precipitation, obscuration etc, but obviously it doesnt work: $w = $data['weather']['proximity']; can someone give me some tips? thanks a lot... phpweather rocks -SR -- |