I’m making a table of mortgage payments and over the life of a mortgage, there may be 360 payments. I want to show payments from today onwards which may be in the middle of the payment. So, let’s say I’m on payment 212 of 360. I want to show 212, then 215 and every 5 years thereafter.
I thought of doing a for loop that shows the first value and then something like
if ($n % 5 == 0) { show a value }
There has to be a better way though. Any ideas?