I am looking to see if there is a smart or optimal way to try and do this for loop which so far I cannot get it to work.
I am trying to do it this way to stop me repeating code however if its not possible then I will just have to repeat code.
Here is what I tried
if(!isset($staff_rows)
for ($i=0; $i < 5; $i++)
else
for ($i=0; $i < $staff_rows; $i++)
So basically I want my forloop to use a variable $staff_rows if it is set otherwise just use default value of 5.
This is the error message
Parse error : syntax error, unexpected T_FOR in
Any ideas?
Thanks