below is my php code to display all date between two dates..but not working properly...
fromdate = 20-04-2015
todate = 25-05-2015
so my code display only 20,21,22,23,24,25
but i need all days between this two months.
expected output
20-04 21-04 22-04 23-04 24-04 25-04 26-04 27-04 28-04 ......upto 25-05
below is my code..
<?php
$startdate = $_POST['fromdate'];
$enddate = $_POST['todate'];
$start = date('d', strtotime($startdate));
$end=date('d', strtotime($enddate));
?>
<?php for ($x = $start; $x <= $end; $x++) { ?>
<th width="58%"><?php echo $x; ?></th>
<?php } ?>