Credit card Year dropdown


/ Published in: PHP
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.