I want to populate some HTML select lists using PHP. E.g. If I were to populate a drop down with a list of values, which would be quicker and easier to maintain? I'm talking really about lists that rarely if ever change such as countries, US states, colors, towns, cities etc.
- Store the values as an array in a separate php file and include it. Then loop through and output each value.
- Store the values in an XML file, load file with simpleXML, loop through each value and output.
- Store in a MySQL db, connect to db, retrieve countries, loop through and output them. (When I backup my db I'll be constantly backing up tables which never change)