question about for loop and mysql dates
| From: | Cory Hicks | Date: | Tue, 22 Apr 2003 19:47:13 +0000 |
| Subject: | question about for loop and mysql dates | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-144897@lists.php.net to get a copy of this message | ||
Hello to all!
Ok...been searching on google and the archives for a while now, nothing
is jumping up and giving me a clue :-)
I am trying to build a drop-down box with a range of dates (mysql
formatted):
$result = mysql_query($sql)
$row = mysql_fetch_array($result);
$time_start = $row["time_period_start"];
$time_end = $row["time_period_end"];
for ($count=1; $count<=$time_end; $count++) {
echo "<option value='" . $count . "'>" . $count .
"</option>";
}
I have tried a whole heap of variations on this..I still get 1-15 in a
drop down or nothing at all.
Any gurus out there care to offer a finger pointing me in the right
direction?
Many thanks!
Cory
--