tibberous Posted May 18, 2009 Share Posted May 18, 2009 I have an enum with three values: cat, dog, horse. I want to make a select box, with an option from each of those three values. However, I want to create it dynamically, so if I add more options to the enum, I don't have to update the code. Is there an easy way to do this? It is something I always find myself wanting to do but can never find out how so I break down and just hard-code the select box. Any ideas? Quote Link to comment Share on other sites More sharing options...
Masna Posted May 18, 2009 Share Posted May 18, 2009 I did some Google-ing, and found this... http://www.usenet-forums.com/php-general/48969-re-php-retrieving-enum-description-mysql.html Hope it helps! Quote Link to comment Share on other sites More sharing options...
tibberous Posted May 18, 2009 Author Share Posted May 18, 2009 Looks like what I need! I'll try it right now Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.