the abbreviations / definitions should be stored in an array
PHP Code:
$metar = array(
'SKC'=>'Clear Skies'
,'FEW'=>'Few Clouds'
,'SCT'=>'Partly Cloudy'
,'BKN'=>'Mostly Clody'
,'OVC'=>'Cloudy'
);
and you could check for a match and print the definition like so:
PHP Code:
if(array_key_exists($sky, $metar)){
print $metar[$sky];
}
however, I'm not clear on how you're getting to this point. How is the "wuhu" variable getting into the php script? are you using php from the command line (is %[wuhu]% a DOS variable (or similar))?
it seems that it would cause problems in PHP (where % is the modulus operator), but if it works, then it works, I guess. I'd be interested in knowing more about what you're doing.
Edit:
whup, Daniel beat me to it while I was trying to research the %variable% thing a little : )
Bookmarks