Jump to content

Drop Down


mcmuney

Recommended Posts

Below is a portion of code that's displaying years from 1900 to current year on a drop down, starting from 1900. What i'd like to do is reverse the order to show current year first. How can I do that?

 

$start_year="1900";

$end_year=date("Y");

$years=array();

for($i=$start_year; $i<=$end_year; $i++)

{

$years[]=$i;

}

Link to comment
https://forums.phpfreaks.com/topic/123850-drop-down/
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.