File manager - Edit - /home/autoph/public_html/api/aha/get_nextFiveYears.php
Back
<?php // Get the current year $currentYear = date("Y") + 1; // Initialize an empty array to store the years $yearsArray = array(); // Loop through and generate the next 5 years, storing each year in the array for ($i = 0; $i <= 5; $i++) { $nY = $currentYear - $i; $yearsArray[] = ["Year" => "$nY"]; } echo json_encode($yearsArray); $connhr->close(); ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings