Created
April 25, 2022 05:17
-
-
Save binarykore/a320a0cd6be6a45ef61cc7bca7bb5243 to your computer and use it in GitHub Desktop.
Calculates the Year of given Time from Starting Year to Current Year..
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 | |
$_currentyear = date("Y"); | |
$_startingyear = "2016"; | |
$_timespan = abs($_startingyear - $_currentyear); | |
$_hash = []; | |
for($_i = 0;$_i <= $_timespan;$_i++){ | |
$_hash[] = ($_startingyear + $_i); | |
} | |
echo(join("\r\n",$_hash)); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment