I would like to insert in my php page, the name of the winds: Mistral, Tramontana etc..etc..., based on the tag [wind0dir-act=endir:--], I'm inexperienced with php, and I'm trying this code, but It doesn't seem to work, could you help me?
Code: Select all
<?php
switch ($direzione_del_vento)
{
case "WNW":
case "NW":
case "NNW":
$s = "Maestrale";
break;
case "N":
$s = "Tramontana";
break;
case "NNE":
case "NE":
case "ENE":
$s = "Grecale";
break;
case "E":
$s = "Levante";
break;
case "ESE":
case "SE":
case "SSE":
$s = "Scirocco";
break;
case "S":
$s = "Ostro";
break;
case "SSW":
case "SW":
case "WSW":
$s = "Libeccio";
break;
case "W":
$s = "Ponente";
break;
}
print $s
?>