Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Remplissage automatique d’un menu

 date
{filelink=12483}

<?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>
 
";
?>

No comments yet.

Leave a Comment