Change your code following way-
<?php
$date2=date('Y', strtotime('+1 Years'));
for($i=date('Y'); $i<$date2+5;$i++){
echo '<option>'.$i.'-'.($i+1).'</option>';
}
?>
solved PHP How to generate School Year?
Change your code following way-
<?php
$date2=date('Y', strtotime('+1 Years'));
for($i=date('Y'); $i<$date2+5;$i++){
echo '<option>'.$i.'-'.($i+1).'</option>';
}
?>
solved PHP How to generate School Year?