title: Arrange list in reverse_array within {foreach}
body: <p>I am using {foreach} within smarty like this</p>
  
  <pre><code>{foreach key=num item=reply from=$replies}
  //something goes here.
  {/foreach}
  </code></pre>
  
  <p>Currently I am getting replies arranged like...</p>
  
  <p>Older --> Old --> New --> Newer</p>
  
  <p>I want to arrange them in this order</p>
  
  <p>Newer --> New --> Old --> Older</p>
  
  <p>How to achieve this ?</p>
  
  <p><strong>Thanks</strong></p>
  
  <p><strong>Solved</strong></p>
  
  <p>Thanks  to ts for this </p>
  
  <pre><code>from=$replies|@array_reverse
  </code></pre>
  
  <p>&amp; Required following smarty plugin </p>
  
  <p>modifier.reverse_array.php</p>
  
  <pre><code>&lt;?php
  /**
   * Smarty plugin
   * @package Smarty
   * @subpackage plugins
   */
  
  
  /**
   * Smarty reverse_array modifier plugin
   *
   * Type:     modifier&lt;br&gt;
   * Name:     reverse_array&lt;br&gt;
   * Purpose:  reverse arrays
   * @author   Noel McGran 
   * @param array
   * @return array
   */
  function smarty_modifier_reverse_array($array)
  {
      return array_reverse($array);
  }
  
  /* vim: set expandtab: */
  
  ?&gt;
  </code></pre>