I am wanting to know what day the first of the month is (eg Mon/Sun) but this doesnt work what am i doing wrong?
$first_day_of_month = date("D", "2005-07-01");
string date ( string format [, int timestamp] )
"2005-07-01" is no timestamp... could that be the reason...
[man]strtotime[/man] may be of help for example
Something like this perhaps?
function first_day_of_month($month,$year) { $date = getdate(mktime(12, 0, 0, $month, 1, $year)); return $date['wday']; }
http://www.php.net/getdate/
hmmm Im still a bit confused actually sorry 😛
so say I have the month value (october) in numberical value 10 how can I use this function?
$selected_date = date("F", 10);
got it: echo date('F',mktime(0,0,0,10,1,2006));