Is there any smart way to send random numbers (e.g. 1-4) to a list using smarty tpl-engine?
standard list sorted 1-5:
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
Here is my solution (PHP):
<ul>
{foreach from=randomNumbers}
<li>{smarty.randomNumbers}</li>
{/foreach}
</ul>
modified list sorted 1-5 (random):
<ul>
<li>3</li>
<li>2</li>
<li>5</li>
<li>1</li>
<li>4</li>
</ul>
I really tested almost everything, but for this I need only a small and small solution :-)
Regards, Heinrich
source
share