Jump to content

MySQL enum and PHP


guyfromfl

Recommended Posts

  • 7 months later...

Is there a way to read a enum'd field's values into an array in php so i can populate a dropdown box with the possible choices? 

 

This way I don't have to change anything if i alter the table.

 

thanks

 

You mean something like this?

$enumArray = explode(",",$row["enumtype"]);

 

Link to comment
https://forums.phpfreaks.com/topic/141384-mysql-enum-and-php/#findComment-919023
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.