Jump to content

[SOLVED] display current year


pixeltrace

Recommended Posts

guys,

 

can you help me with my drop down menu for year selectin my

 

in my current codes its displays the year from 2001 to 2007

now what i wanted to happen is it will display the year

from 2007 to 2001

 

this is my current code which displays the year from 2001 to 2007

hope you could help me with this.

<?php
					for($i=2001; $i<=date("Y"); $i++){
					   print '<option value="'.$i.'"';
					   if($yearText == $i){
						  print ' selected';
					   }
					   print '>'.$i.'</option>';
					}
				  ?>

 

thanks!

Link to comment
https://forums.phpfreaks.com/topic/45042-solved-display-current-year/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.