Last active
April 29, 2018 07:16
-
-
Save jamalnasir/988d2f26c2aec55cbe8b5c0238b6cbde to your computer and use it in GitHub Desktop.
Printing Months and Years
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$years = []; | |
$months = []; | |
foreach(range(Carbon::now()->year - 100, Carbon::now()->year, 1) as $year){array_push($years, $year);} | |
foreach(range(2, 12) as $key=>$month){array_push($months, date('F', mktime(0,0,0,$month)));} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment