Remplissage automatique d’un menu

Author:

 date
Download

<?php
 
// obtenir la date
$aujourdhui = mktime(0,0,0);
print '
<select name="date">';
for ($i = 0; $i < 7; $i++) {
    $timestamp = strtotime("+$i day", $aujourdhui);
    $affichage = strftime('%A, %B %d, %Y', $timestamp);
    print '
<option value="' . $timestamp .'">'.$affichage."</option>
 
";
}
print "
</select>
 
";
?>

Leave a Reply

Your email address will not be published. Required fields are marked *


8 − three =