{foreach from=$myArray item=item}
{$item.attribute}
{/foreach}
instead of printing all attributes of each element of the array, I want to output only the 3rd element WITHOUT using a foreach loop, is it possible?
I'm looking for something like the below, but I don't know the syntax:
$myArray[2].attribute
{$myArray[2].attribute}
would be correct. Did you try it?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With