Hi all, I have a database not designed by me which has some values as month1, month2, month3 etc etc until month24. I need to display each value and I am looking for a quicker way other than manually doing 24 HTML lines. Because for each of this values echoing in Blade I have to do if, ifelse checks. I was hoping I could do a for loop and just concatenate the variable name with the index of the for loop to the the month1 until month24
And I keep getting Parse error: syntax error, unexpected '?'. I tried doing:
But that just simply echoes the desired variable name as a string. Any ideas how to solve this? Or a better way to iterate through the fields?