<?php
$result = [
['country_code' => 'US', 'country_name' => 'United States'],
['country_code' => 'UK', 'country_name' => 'United Kingdom'],
];
foreach ($result as $row) {
printf(
"<option value=\"%s\">%s</option>\n",
trim(htmlentities($row['country_code'])),
trim(htmlentities($row['country_name']))
);
}
- Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.26, 8.3.0 - 8.3.14, 8.4.1
- <option value="US">United States</option>
<option value="UK">United Kingdom</option>
preferences:
80.85 ms | 407 KiB | 5 Q