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'])) ); }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
151.65 ms | 2125 KiB | 11 Q