title: Smarty sort array
body: <p>Im looking to sort a list of product names being output by Smarty. Here is the current code:</p>
  
  <pre><code>{foreach from=$products key=i item=product}
    &lt;li&gt;
        &lt;a href="discuss.php?product={$product.uri}
        {if $filter_style}&amp;amp;style={$filter_style}{/if}"&gt;{$product.name|capitalize}
        &lt;/a&gt;
    &lt;/li&gt;
  {/foreach}
  </code></pre>
  
  <p>The HTML output:</p>
  
  <pre><code>&lt;li&gt;zzzzz&lt;/li&gt;
  &lt;li&gt;qqqqq&lt;/li&gt;
  &lt;li&gt;ccccc&lt;/li&gt;
  &lt;li&gt;aaaaa&lt;/li&gt;  
  </code></pre>
  
  <p>How can I sort A-Z? </p>