Split data in form

Hello!

I'm working on some form where I have three select elements for birth day, month and year. The problem is that I created single field called date in database and I would like to split it everytime when form loads from Y-m-d to select fields for year, month and day.

Is that possible and if it's, how to do it?

Thank you!



19.6k

Try to var_dump() the date you receive from the DB, then do a explode based on the delimiter you need to use.

More info: http://stackoverflow.com/questions/7103617/simple-question-how-to-split-date-08-17-2011-into-month-day-year-php