I want to create a dropdown box, in PHP and HTML, where the starting year will be 2020 and the current year will be 2023 [auto]. the year session will append in select box like:
2020-2021
2021-2022
2022-2023 // selected
.. auto for 2024
yes but my question is like this if the current year is 2023 then select option will 2022-2023, same if this current year is 2024 then it should be 2023-2024
Well how is the current year defined in my example and how did I get the value for the next year? It was the date("Y")+1. So for the range from and to values you would define them as you want them to be.