title: show all weekends between 2 dates in groups
body: <p>I trying to show the weekends between 2 dates in a formatted way.</p>
  
  <p>For an example:</p>
  
  <pre><code>$start = strtotime(date('Y-m-d'));
  $end = strtotime(2018-06-12);
  
  for ($i = $start; $i &lt;= $end; $i = strtotime("+1 day", $i)) {
  
  //show weekends as 
  // saturday and sunday - march 24-25, 2018
  // saturday - march 31, 2018
  // sunday - april 1, 2018
  // saturday and sunday - april 7-8, 2018
  //.........
  
  
  
  }
  </code></pre>
  
  <p>If you can see above i need to group the weekend and if the saturday and sunday falls in 2 different months show them separately.</p>
  
  <p>Can someone please help me how to do this?</p>