Printing date out of array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is my date array:

$months = array (1 => 'January', 'February', 'March', 'April', 'May',
'June', 'July', 'August', 'September', 'October', 'November',
'December');



This is my date select in the form:


echo '<select name="day">';
for ($day = 1; $day <= 31; $day++) {
	echo "<option value=\"$day\">$day</option>\n";
}
echo '</select>';

echo '<select name="year">';
$year = 2008;
while ($year <= 2020) {
	echo "<option value=\"$year\">$year</option>\n";
	$year++;
}
echo '</select>';


This is how it submits to mysql:




Now, when I submit it to mysql, it's all in mm-dd-yyyy format.

When I submit it to an e-mail, I'd like it to me Month-dd-yyyy. How
could I do this?

Would it be easier to pull the date from mysql and break it down
somehow? And if so how would I do that?


-- 
Michael S. Dunsavage


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux