I want to use php array for HTML select list. In this case it will be the list of countries but beside of country name that is listed in drop down list I need as a value of
First make an associated array of country codes like so:
$countries = array( 'gb' => 'Great Britain', 'us' => 'United States', ...);
Then do this:
$options = ''; foreach($countries as $code => $name) { $options .= "$name\n"; } $select = "\n$options\n";