Hi,
I have several MySQL fields of type "Date".
I use $month $day $year variables from an HTML form to udpate the date fields in database like this:
$date='$year$month$day';
This is the okay part.
I've done a ton of research, but I cannot seem to figure out how to:
1) convert the numeric $month variable into a string and
2) drop the leading zero of the $day variable.
ex:
$month = "1";
$month = date("F"); // returns current month "September" instead of "January"
I've been looking all over and I can't figure out a simple way to convert the numeric date to a string format other than using IF statements
if ($month=="1") {$month="January";} //etc.
Similarly, the date("j") function uses today's day rather than my variable day.
Can you help me?