It has been repeated several times in the template, can you simplify it?

                    <select name="class">
                        {foreach $res as $value}
                            <option>{$value["class"]}</option>
                        {/foreach}
                    </select>

the above code, in my template file, different places, repeated 3 times (exactly the same), excuse me, can it be simplified?

Jan.28,2022
The

backend directly writes an output of select DOM to the variable, and the view output variable is fine.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36029-2b528.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36029-2b528.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?