I created a form that a user needs to fill out. Based on the age answer, I will need to list all years between the current year and the birth year. I was able to figure out how to convert the age number to an actual year with:
function birthday_year($years) {
return date('Y', strtotime($years . ' years ago'));
}
$byear = birthday_year($age);
echo $byear;
I'm having a difficult time listing all the years between the birth year and current year. Any guidance would be appreciated. I was able to find other code examples that list months but when I try to manipulate the code to years it doesn't work at all. Only my 3rd week with PHP, so its still pretty new to me. Thanks!