I\'m trying to get the number of the month of the year by the number of a week of the year and the year. So for example week 1 is in january and returns 1, week 6 is in february
Something like this will do, this is also tested and works:
function getMonthByNumber($number,$year) { return date("F",strtotime('+ '.$number.' weeks', mktime(0,0,0,1,1,$year,-1))); } echo getMonthByNumber(27,2011);
Hope this helps