I have a list of cities.
<select name="cities">
<option value="nc">New city..</option>
<option value="quetta">Quetta</option>
<option value="karachi">Karachi</option>
<option value="islamabad">Islamabad</option>
<option value="khyber pukhtun khuan">Khyber Pukhtun Khuan</option>
<option value="multan">Multan</option>
<option value="murree">Murree</option>
<option value="gwadar">Gwadar</option>
<option value="gujranwala">Gujranwala</option>
<option value="faisalabad">Faisalabad</option>
<option value="peshawar">Peshawar</option>
</select>
And i have a database in which i have stored user's city. Now i am making a page in which the user will update his city and for that i want the user to see his city already selected when he opens up the page. In short, i want a option to be selected according to the value returned by the database. I am using php as the language
I have got one solution but not implemented it yet because its not effecient! Any easy and effecient way would be appreciated.
Thanks in advance :)