Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,409 members, 7,808,456 topics. Date: Thursday, 25 April 2024 at 12:09 PM

Building A Drop Down List In A Web Page - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Building A Drop Down List In A Web Page (941 Views)

What's Tools Do I Need To Start Building A Messaging App / Simple Drop Down Menu With Jquery And CSS / Facebook Style Drop Down Menu Design Using CSS (2) (3) (4)

(1) (Reply)

Building A Drop Down List In A Web Page by JimmyBishop: 11:39am On Oct 13, 2016
Please guys, I need a help here. I am trying to build a web page. How can I sort all the States in Nigeria in alphabetical order in drop down list in html and php. Thanks
Re: Building A Drop Down List In A Web Page by Karleb(m): 1:34pm On Oct 13, 2016
save it an array and sort the array with sort() or asort() then print the array like:

$states will be assigned to your array.
<select>
<?php
foreach ($states as $arr){
<option>
print_r($arr);
</option>
}
?></select>
Re: Building A Drop Down List In A Web Page by JimmyBishop: 11:20am On Oct 14, 2016
Plenty thanks my guy. Let me try it out and see how it works.

(1) (Reply)

Africa's Digital Assets Marketplace / I.C.T Community (abuja) / ...

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 10
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.