This article mainly introduces how to generate a drop-down list in the past 100 by using php. It involves related skills related to date format conversion in php and has some reference value. For more information, see
This article mainly introduces how to generate a drop-down list in the past 100 by using php. It involves related skills related to date format conversion in php and has some reference value. For more information, see
This example describes how php generates a drop-down list in the past month. Share it with you for your reference. The details are as follows:
Year selection is often used in projects. This code will automatically generate a drop-down list for the past 100 from this year.
<? Php $ years = range (date ("Y"), date ("Y", strtotime ("now-100 years"); foreach ($ years as $ year) {echo''. $ Year .'';}?>
I hope this article will help you with php programming.