title: Get array first key value in Smarty
body: <p>This is my code for navigation</p>
  
  <pre><code>&lt;ul class="sortlist"&gt;
     &lt;li class="first"&gt;&lt;strong&gt;{$smarty.const.LBL_SORTBY}: &lt;/strong&gt;&lt;/li&gt;            
     {foreach  $listsortby as $key=&gt;$filterby}
         &lt;li class="filterLink"&gt;&lt;a href="javascript:void(0);" id="{$key}" class="current"  &gt;{$filterby}&lt;/a&gt; &lt;/li&gt; 
     {/foreach}
  &lt;/ul&gt;
  </code></pre>
  
  <p>and Here I want to get the first key, and add class="current"</p>
  
  <p>and rest is empty.</p>
  
  <p>How to get first value and add class name for first navigation?
  Thanks in advance</p>