PHP generated the past 100 years drop-down list of methods, PHP generation 100 dropdown _php Tutorial

Source: Internet
Author: User

PHP generated the last 100 years drop-down list method, PHP generated 100 dropdown


This example describes how PHP has generated the drop-down list for the past 100 years. Share to everyone for your reference. Specific as follows:

Year selection is often used in projects, and this code automatically generates a drop-down list of the last 100 years starting this year

<?php $years = range (date ("Y"), date ("Y", Strtotime ("now-100 Years")); foreach ($years as $year) {   echo ''. $year. '

I hope this article is helpful to everyone's PHP programming.

http://www.bkjia.com/PHPjc/1035665.html www.bkjia.com true http://www.bkjia.com/PHPjc/1035665.html techarticle PHP generated a drop-down list of the past 100 years, PHP generation 100 drop-down This article describes how PHP generated the last 100-year drop-down list. Share to everyone for your reference. Specific as follows: ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.