Home » , » Looping date with php

Looping date with php

(Feb 20, 2011)


<?php
date_default_timezone_set('UTC');

$dates = '2010-01-01';
$end_dates = '2011-01-01'';

while (strtotime($dates) <= strtotime($end_dates)) {
echo $dates;
$dates= date ("Y-m-d", strtotime("+1 day", strtotime($dates)));

}
?>

Posted in Label: ,  

0 komentar:

Post a Comment


 

Script Language



© 2011 Script31 - All Rights Reserved


TopOfBlogs Computers Blogs