country in dropdown list

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

country in dropdown list

Post by pleigh »

hi, i am making a dropdown list of countries, but typing it in html will take me so long to finish it...any suggestions on where i can get a function for this??thanks in advance.. :)
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Where are you getting your list from? A database? Hard coding it?
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

Post by pleigh »

what is the smartest thing to do?maybe from db, but is that smart??or harcode?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Tither can be fairly flexible. The decision may come down to "who will be maintaining this?" If the answer is a programmer, hardcoded is fairly okay (it should be a function call), otherwise it should be in the database so it can be updated with new countries and remove any that disappear 8O
User avatar
pleigh
Forum Contributor
Posts: 445
Joined: Wed Jan 19, 2005 4:26 am

Post by pleigh »

yup, thanks guys, your advise is very much appreciated.. :)
User avatar
a94060
Forum Regular
Posts: 543
Joined: Fri Feb 10, 2006 4:53 pm

Post by a94060 »

is there anyfunction which can amke an automatic array of the country names? wit the abreeviation.


ex
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

uh, no. The list of countries changes almost weekly these days. Okay, probably not weekly, but it does change fairly often.
Post Reply