current. PHP - Get Start And End Date Of The Following Week - Free PHP Programming Tutorials, Help, Tips, Tricks, and More. If omitted, the current date and time will be used (as in the examples above). For ex, if Month = 12 and year = 2009, there are 5 weeks. As a sidenote, so my answer is a bit more complete: the day you'll want to do something like this: PHP will interpret your code as if you were trying to use the $names variable -- which doesn't exist. PHP date: Exercise-17 with Solution. Sample week and year : 12, 2014 PHP date formatting, date calculation, and obtaining the start and end dates of the current week and month. Here I want to print those days which days between start-date and end-date. see my codes bellow: