Script ini berfungsi untuk pengulangan tanggal sesuai yang kita inginkan
------------------------------------------------------------------
<?php
$awal_hari = '2011-02-01';
$akhir_hari = '2011-02-20';
while (strtotime($awal_hari) <= strtotime($akhir_hari)) {
echo $awal_hari;
echo "<br>";
$awal_hari= date ("Y-m-d", strtotime("+1 day", strtotime($awal_hari)));
}
?>
-----------------------------------------------------------------
------------------------------------------------------------------
<?php
$awal_hari = '2011-02-01';
$akhir_hari = '2011-02-20';
while (strtotime($awal_hari) <= strtotime($akhir_hari)) {
echo $awal_hari;
echo "<br>";
$awal_hari= date ("Y-m-d", strtotime("+1 day", strtotime($awal_hari)));
}
?>
-----------------------------------------------------------------
Tidak ada komentar:
Posting Komentar