Your question can be understood more than one way. It would be helpful if you could tell us more precisely what you are trying to do, and what you mean by
dynamic number in your own use context.
For example, if you really just want "
the number of years between 2000 and 2017" then simply do the math and echo the result:
If you want each year in the range then a for loop will do it:
Code:
for($x=2000;$x<=2017;$x++)
echo $x."\n";
How you do it depends very much on what you are trying to do.