Is it possible to bold certain cities in a dropdown field that fetches data from a MySQL database in PHP?

It is possible to bold certain cities in a dropdown field by using HTML formatting within the options of the dropdown. You can achieve this by adding the <b> tag around the city names that you want to be bolded. When fetching data from a MySQL database in PHP, you can include this HTML formatting within the options to display the bolded cities in the dropdown.

&lt;select name=&quot;cities&quot;&gt;
    &lt;?php
    // Fetch data from MySQL database
    $cities = [&#039;New York&#039;, &#039;Los Angeles&#039;, &#039;Chicago&#039;, &#039;Houston&#039;, &#039;Philadelphia&#039;];
    
    // Loop through cities and display in dropdown
    foreach ($cities as $city) {
        if ($city == &#039;New York&#039; || $city == &#039;Chicago&#039;) {
            echo &#039;&lt;option value=&quot;&#039; . $city . &#039;&quot;&gt;&lt;b&gt;&#039; . $city . &#039;&lt;/b&gt;&lt;/option&gt;&#039;;
        } else {
            echo &#039;&lt;option value=&quot;&#039; . $city . &#039;&quot;&gt;&#039; . $city . &#039;&lt;/option&gt;&#039;;
        }
    }
    ?&gt;
&lt;/select&gt;