Access Array Element with Smarty
Posted
by streetparade
on Stack Overflow
See other posts from Stack Overflow
or by streetparade
Published on 2010-06-01T12:28:25Z
Indexed on
2010/06/01
12:33 UTC
Read the original article
Hit count: 141
How can i acces an Array Element in Smarty with a second variable as index?
Imagine i have an array of language
[99] = Array
(
[language] = English
)
I tryed this :
$memberLanguage.id is 99
so logicaly you would acces it this way
{$language.$memberLanguage.id.language}
but this doesnt work.
in PHP i would do it this way
$language[$memberLanguage['id']]['language']
How can i access the Array Element Dynamicaly?
© Stack Overflow or respective owner