note 59184 added to function.date
| From: | garis at intec dot edu dot do | Date: | Mon, 28 Nov 2005 21:46:41 +0000 |
| Subject: | note 59184 added to function.date | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-99265@lists.php.net to get a copy of this message | ||
To print a drop down box, with the next three years:
can be used for days, months, etc. or any other value you want to print a lot of values... there is
just the concept
<select name="year">
<option selected>YEAR</option>
<?php
$year = date('Y');
$itmp = $year+3;
for ($i=$year; $i <= $itmp; $i++) {
printf('<option
value=\''.$i.'\'>'.$i.'</option>');
}
?>
</select>
----
Manual Page -- http://www.php.net/manual/en/function.date.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+59184
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59184&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59184&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59184&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59184&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59184&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59184&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59184&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+59184&report=yes
Search -- http://master.php.net/manage/user-notes.php