I have a loop and index but an issue arise when index is a value 3. It should stay as a constant 2 within a loop. As our container involves values for each day, we need index. An example within HTML:
<div class='container".($index+1)."'>
Index starts at 0 till 10 but class should be kept as value 2 and limit index (1) that we get <div class='container2'>
Is it technically possible to stay at 2 after index increases to 2 as class value should not reach 3:
<div class='container3'>
It works if index has value 1 but when index is 2 it will collapse HTML as we need to stay at number 2:
There’s a word for this logical mindscrew (“I want the maximum value to be X”, “The function you want is the minimum.”), but i dont know it.
EDIT: The word my brain is probably trying to dig up is “counterintuitive”, but it is also trying to tell me there’s an actual name for things like this.