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? Link to comment https://forums.phpfreaks.com/topic/158645-select-box-from-enum-field/ 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! Link to comment https://forums.phpfreaks.com/topic/158645-select-box-from-enum-field/#findComment-836685 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 Link to comment https://forums.phpfreaks.com/topic/158645-select-box-from-enum-field/#findComment-836690 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.