| Index | PHPmyEasyWeather | PHPmyEasyWeather Homepage |
getTafParts -- return exploded TAF string
Array getTafParts (string $TAF);
getTafParts explodes a string into its MAIN / PROB / BECMG / TEMPO / FM groups. Each occurance of PROB40 (or any other value of PROB), BECMG, TEMPO or FM will start a new group. To have this is a good supposal to continue with getTafType.
Example:
<?
include ("phpmyeasyweather.inc.php"); $TAF = "TAF GCRR 291700Z 300024 03016KT PROB40 TEMPO 0015 03020G30KT TEMPO 1118 09016KT";
$foo = getTafParts ($TAF); for ($bar=0;$bar<count($foo);$bar++) { echo "$bar: " . $foo[$bar] . "<br>"; }
?>
will explode the original TAF code in the 3 groups:
0: TAF GCRR 291700Z 300024 03016KT 1: PROB40 TEMPO 0015 03020G30KT // starting a new group because of PROB40 2: TEMPO 1118 09016KT // starting a new group because of TEMPO
| Previous | Up | Next |