problem description
there are many rows in the data table, and each row has 10 fields such as day_1, day_2, day_3,..., and day_10. The data has been obtained to the list array and needs to be output as a table in the template file.
the environmental background of the problems and what methods you have tried
use the for loop in volist. You want each line to automatically loop 10 times, automatically typing out $vo.day_1, $vo.day_2, $vo.day_3,... $vo.day_10 each time, but according to the following, {$vo.day_$i} will prompt for an error.
syntax error: unexpected"$i" (T_VARIABLE), expecting","or";"
related codes
{volist name="list" id="vo"}
{for start="1" end="10"}
{$vo.day_$i}
{/for}
{/volist}
what result do you expect? What is the error message actually seen?
excuse me, how can I let the program automatically output the values of $vo.day_1, $vo.day_2, $vo.day_3,... $vo.day_10?
Thank you very much!