I'm trying to build a PHP if expression.
In English, here's the conditions for the IF to be true:
Visbility < 5000m
OR
BKN/OVC < 1500ft
Now, the variables I have to play with are:
for Visibility: $visibility and for the BKN/OVC: it's a bit more complex.
This data is given in
$xml->data->METAR[0]->sky_condition
The data itself is pulled from XML file with the relevant information looking like this:
<sky_condition sky_cover="BKN" cloud_base_ft_agl="600"/>
<sky_condition sky_cover="SCT" cloud_base_ft_agl="1100"/>
Any ideas on how I could sort through the sky_condition->sky_cover for the relevant information and feed it through to the IF?
Thanks.