I have a string called $columns which dynamically gets a value from 1 to 7. I want to create a loop of for however many times
$columns
just repeat $n times? ... if dont mind that $n goes backwards... the advantage is that you can see/config "times" at the beginning
$n = 5; while (--$n >= 0) { // do something, remember that $n goes backwards; }