|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
jschmidt Smarty n00b
Joined: 28 Oct 2015 Posts: 1
|
Posted: Wed Oct 28, 2015 6:26 pm Post subject: Need help sorting results in a loop |
|
|
I'm unfamiliar with smarty, so am hoping someone can help me out here. How would I get this code to display its results in alphabetical order? Thanks so much in advance!
<ul style="line-height:20px;">
{section name=i loop=$document}
<li><a href="download.php?id={$document[i].id}&type=file">{$document[i].title}</a> </li>
{/section}
</ul> |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Oct 28, 2015 11:33 pm Post subject: |
|
|
->assign() the already sorted array to Smarty. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|