<?php function gunler($basla, $bitir) { $a = strtotime($basla); $b = strtotime($bitir); if($b > $a){ while($a < $b){ echo date('d-m-Y', $a).'<br>'; $a += 86400; } } } gunler('2012-10-01', '2012-12-31');