|
Ok -- pulling current date from date(); and pulling last date from mysql database and converting both to Month (F) format.
Code to find current month:
$current_month = date(F);
echo $current_month;
Code to find last month listed:
$q_maxdate = mysql_query("SELECT MAX(start_date) from courses.courseschedule;");
$q_maxdate_result = mysql_fetch_row($q_maxdate);
$q_maxdate_result = $q_maxdate_result[0];
$date = new DateTime($q_maxdate_result);
$format_late_date = $date->format("F");
echo $format_late_date;
Would like to be able to find the months between those two dates and then post them.
Anyone know how? Can't really +1 to a date????
Thanks
|