Im making a calendar script right now and what I wanna do is somehow figure out what number the last day of the week is using getdate()... by day number i mean where sunday=0 and saturday=6
right now I am able to get the first day using this
$date = getDate();
$month = $date["mon"];
$year = $date["year"];
$this_month = getDate(mktime(0, 0, 0, $month, 1, $year));
$first_week_day = $this_month["wday"];
somehow there has to be a way... ive googled but to no success thus far