RE: [PHP] Date Listing

From: Date: Wed, 10 Dec 2003 20:57:56 +0000
Subject: RE: [PHP] Date Listing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-172383@lists.php.net to get a copy of this message
<?php for($i = 0; $i <= 31; $i++) { $theday = strtotime("+$i day"); echo '<option value="',date('Y-m-d',$theday),'">',date('l, F j',$theday),'</option>'; } ?> Where $i <= 31 is the number of days you want looped HTH Jay -----Original Message----- From: Pablo Zorzoli [mailto:plz@aconectarse.com] Sent: Wednesday, December 10, 2003 2:47 PM To: php-general@lists.php.net Subject: [PHP] Date Listing Hi everyone! Let's see if you can help me with this odd function i want to do. Imagine i have to dates,for example: $date1="2002-10-01" $date2= "2003-12-10" I want a function to list all the dates that are between these two. "2002-10-01" "2002-10-02" "2002-10-03" ..... ..... "2003-12-09" "2003-12-10" Has anyone done something like this before. Thanks, Pablo -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#172383) next »