date functions
| From: | Broder B | Date: | Sat, 16 Dec 2000 14:30:39 +0000 |
| Subject: | date functions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-30671@lists.php.net to get a copy of this message | ||
Yo!
I'm currently working in a calendar and I've run into problems. I use this code to create
a <select> tag with 12 <option> tags, one for each month.
$month = 1;
while ($month <= 12) {
echo "<option value=" . date("F", mktime(0, 0, 0, $month, 1,
2000)).">".date("F", mktime(0, 0, 0, $month, 1, 2000));
++$month;
}
this works fine, but now I want to list all the days in a certain month, and I don't know how
to achieve that. I can't use a while statement as with the months, because I don't know
how many days it will be in a certain month, (I know that it will allways be 12 months though) so
how can I do this?
Any help much appreciated!!
/Broder