Index PHPmyEasyWeather PHPmyEasyWeather Homepage

Home
Demo
FAQ
Download
> Documentation
Contact
      

displayStationMenu

displayStationMenu -- return a complete airport dropdown menu in HTML

Description

string displayStationMenu(string $state, string $name, string $class);

displayStationMenu is the next very convenient "display" - function which returns you a complete HTML code for a dropdown menu (using <select>) where one can select an airport station for the given country.

As first parameter it expects the 2-letter country shortcut e.g. generated by displayCountryMenu. As second parameter it expects the name of the variable which will contain the airport name (better to say the 4-letter ICAO - code of the airport). Note: neither the variable itself nor its content is asked but the name of the variable. If e.g. you provide the ICAO code in your script as $ICAO, so you have to state explicitly "ICAO". As third Parameter it expects the name of the css - class for the select - menu.

Note: if the first parameter of displayCountryMenu is e.g. "country" I recommend to state $country as second parameter for displayStationMenu. If you read this for the first time it may be a little cluttering but once you checked it it will be very easy and comfortable. For more information check out the index.html of the PHPmyEasyWeather package to see how it works.

      

Previous Up Next