Credit card Year dropdown

/ Published in: PHP

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
  3. //this code generates option tags for select dropdown
  5. for($i=date("Y");$i<date("Y")+11;$i++) echo "<option value=\"$i\">$i</option>"; ?>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.