I need to get 26 dates from a starting point. The next date starting from the previous one. It would be insane to hard code everything... So I was wondering how can I do this dynamically? Is there a smarter way? I'm looking to increment after the second date. Maybe with a for loop?
<?php
//incrementing dates for bi-weekly (26 periods// 26 dates)
$firstdate = strtotime("+17 days", strtotime("2017-04-03"));//1
$i = date("Y-m-d", $firstdate); echo date("Y-m-d", $firstdate);//echo for testing
echo'<br>';
$seconddate =strtotime("+14 days", strtotime($i));//2
$ii = date("Y-m-d", $seconddate); echo date("Y-m-d", $seconddate);//echo for testing
echo'<br>';
?>