Posted By

resting on 09/01/11


Tagged

day


Versions (?)

Day, Month, Year for CI


 / Published in: PHP
 

  1. // Date options
  2. $day_fields = array(
  3. '01'=>'01', '02'=>'02', '03'=>'03', '04'=>'04', '05'=>'05', '06'=>'06', '07'=>'07', '08'=>'08', '09'=>'09', '10'=>'10',
  4. '11'=>'11', '12'=>'12', '13'=>'13', '14'=>'14',
  5. '15'=>'15', '16'=>'16', '17'=>'17', '18'=>'18', '19'=>'19', '20'=>'20', '21'=>'21', '22'=>'22', '23'=>'23',
  6. '24'=>'24', '25'=>'25', '26'=>'26', '27'=>'27', '28'=>'28', '29'=>'29', '30'=>'30', '31'=>'31'
  7. );
  8. $mth_fields = array(
  9. '01'=>'Jan', '02'=>'Feb', '03'=>'Mar', '04'=>'Apr', '05'=>'May', '06'=>'Jun', '07'=>'Jul',
  10. '08'=>'Aug', '09'=>'Sep', '10'=>'Oct', '11'=>'Nov', '12'=>'Dec'
  11. );
  12. // Yr fields
  13. $key = date('Y');
  14. $yr_fields = array();
  15. for($i=0;$i<5;$i++)
  16. {
  17. $yr_fields[$key + $i] = $key + $i;
  18. }
  19. ?>

Report this snippet  

You need to login to post a comment.