//Get the date of the first day of the year
$firstmonday =mktime(0,0,0,1,1,$year);
if(date("w",$firstmonday)==1){ // if the day of the week is monday, first monday of the year is 1.1
$firstmonday=date("D j M Y",$firstmonday);
}else{ // otherwise we check the weekday of the first day, and substract its value from the last day of previous year....voilâ
$day = date("w",$firstmonday);
if($day==0) $day=7;
$firstmonday=date("D j M Y",mktime(0,0,0, 12,31 - $day + 2, $year - 1));
}