So, it looks like that I get a Wed back because there's an error in putting my dates together.
This works:
Code: Select all
$timestamp = strtotime('2007-01-11 16:09:30');
echo date('D', $timestamp);
It retuns Thu lke it should, but this doesn't work:
Code: Select all
$year = '2007';
$month = '01';
$day = '11';
$timestamp = $year . '-' . $month . '-' . $day . ' 16:09:30';
echo date('D', $timestamp);
It returns Wed no matter what date I give those values.
I understand that the method I'm doing it is odd, but the date is passed to a link and generates a new calendar week based on that.
Code: Select all
<a href=\"calendar.php?year=" . $year . "&month=" . $month . "&day=" . $day . "\" class=\"text1\">Next week</a>
So how do I use $year, $month and $day to generate a valid timestamp?