3v4l.org

run code in 300+ PHP versions simultaneously
<?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'])) ); }

preferences:
24.36 ms | 406 KiB | 5 Q