Good Morning to all,
Here I explain,how to solve this problem: count the number of second saturday, fourth saturday,all sunday between two date using php. Its very simple and easy to understand.
$total = 0;
$startdate=strtotime("second saturday of".$from_date);
while($startdate <= $enddate)
echo date("Y-m-d", $startdate) . "<br>";
$startdate = strtotime("+2 week", $startdate);
First we consider two date and store to variable for develope application like from date and to date. In the above example the fromdate is 2017-08-11 and to date is 2017-09-22. Next we create one variable total for counting number of second,fourth saturday and all sunday betweeen the date. The strtotime is one of the important function in php date.This is used to convert an English textual datetime description to a UNIX timestamp.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.