Index PHPmyEasyWeather PHPmyEasyWeather Homepage

displayCountryMenu

displayCountryMenu -- return a complete country dropdown menu in HTML

Description

string displayCountryMenu (string $name, string $class);

displayCountryMenu is another very convenient "display" - function which returns you a complete HTML code for a dropdown menu (using <select>) where one can select a country.

As first parameter it expects the name of the variable containing country´s name. Note: neither the variable itself nor its content is asked but the name of the variable. If e.g. you provide country´s name in your script as $country, so you have to state explicitly "country". For more information check out the index.html of the PHPmyEasyWeather package to see how it works.

As a second parameter it expects the name of the css - class for the select - menu.

Another note: displayCountryMenu makes use of javascript, so if you select a country it will redirect automatically itself with the new GET - variable containing the name of the selected country, for further use in displayStationMenu


Previous Up Next