I need to create a function that takes month and year as parameters and returns the name of the day which was the 1st of the month.
For e.g. today is the 30th day of March 2012, how do I find out which day was the 1st? All I know is March 2012.
Sorry for repeating, I just want to be clear.
Ack, totally misread… ok, instead that should be
date('D',strtotime($year.'-'.$month.'-01'))I assume by name of day you mean Monday, Tuesday, etc. Change the ‘D’ parameter there to ‘l’ (lowercase L) if you want the date written out instead of Mon, Tue, etc.