Page 1 of 1

retrieve array elements (smarty)

PostPosted: Thu Dec 26, 2013 4:35 am
by ruthenoid
I need to retrieve an array element in my template using smarty.
this is my array:
Code: Select all
[[assign var=foo value=$entry.extrafields.tank|explode:"|"]]

how can I get
Code: Select all
$foo[0]

?
I mean
Code: Select all
[[$foo[0]]]
does not work.
Thanx

Re: retrieve array elements (smarty)

PostPosted: Thu Dec 26, 2013 9:54 am
by hansfn
Code: Select all
[[ $foo.0 ]]

Re: retrieve array elements (smarty)

PostPosted: Thu Dec 26, 2013 11:02 am
by ruthenoid
Thank you!