Posted By

acosonic on 09/14/16


Tagged

php year dropdown date credit-card


Versions (?)

Credit card Year dropdown


 / Published in: PHP
 

This snippet adds credit card select box dropdown values 10 years in future from current year.

  1. <?php
  2.  
  3. //this code generates option tags for select dropdown
  4.  
  5. for($i=date("Y");$i<date("Y")+11;$i++) echo "<option value=\"$i\">$i</option>"; ?>

Report this snippet  

You need to login to post a comment.