Get the weekday of a date
Posted on 2010-09-21
I have a start date and an end date; for example :
'2010-09-25 12:25:00' and '2011-06-30 23:59:59'
I would like to regroup all the mondays, tuesdays, wednesdays, etc. in an array :
$grid = array(
1 => array(), // store Mondays between those two intervals (in format : 2010-09-25, time is not needed)
2 => array(), // store Tuesdays between those two intervals
3 => array(), // etc.
4 => array(),
5 => array(),
6 => array(),
0 => array()