Hi, I’m looking to get a list of the date of the first x day of the week of the month i.e. the date of the first monday of each month 01/03/2005, 02/07/2005, 03/07/2005, 04/04/2005, etc. Any help is appreciated. Thanks. ck213
[code=php] $yr = 2005; $dayName = "Monday"; for($mo = 1; $mo <= 12; $mo++) { for($day = 1; $day <=7; $day++) { $timestamp = mktime(1,1,1,$mo,$day,$yr); if(date('l', $timestamp) == $dayName) { echo "<p>The first $dayName of "; echo date('F', $timestamp); echo " is " . date('m/d/Y', $timestamp) . ".</p>n"; break; } } } [/code]
Help @ck213 spread the word by sharing this article on Twitter...