php - Smarty: print a specific element of an array WITHOUT using foreach loop -
{foreach from=$myarray item=item} {$item.attribute} {/foreach}
instead of printing attributes of each element of array, want output 3rd element without using foreach loop, possible?
i'm looking below, don't know syntax:
$myarray[2].attribute
{$myarray[2].attribute}
correct. did try it?
Comments
Post a Comment