Hey everyone. Currently, I have a variable $date that is just numbers in a MMDDYYYY format. I wanted to know if I used 3 dropdowns: one for month day and year if I could combines the 3 results into that one $date variable. Any ideas there? The next question is when I want to display this data on my site somewhere, how can I convert say: 09152010 to September 15th, 2010. I know these are both possible but need some direction as to where to get started on this. Thanks everyone!
So, first you would have to use $_GET or $_POST to get dropdown data, and then for example use it like this: $date = $_GET['month'].$_GET['day'].$_GET['year']; Code (markup): and for second question, you could use http://www.php.net/date_parse_from_format
http://php.net/manual/en/language.operators.string.php http://php.net/manual/en/function.strtotime.php http://php.net/manual/en/function.date.php Follow the examples on the documentation page(s).
AWESOME replies, I knew how to do the post thing to a variable, but wasn't aware you could combine 3 of them. The other documentation looks great as well. Thanks!