Access to multidimensional array in smarty template
| From: | Jiří Němec | Date: | Tue, 04 Nov 2003 11:34:11 +0000 |
| Subject: | Access to multidimensional array in smarty template | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-10498@lists.php.net to get a copy of this message | ||
Hello,
is there some solution how to solve this problem? - there are selected
data from db table and there is a multidimensional array. How can I
acces to value in multi-array via index from db selected data.
Eg:
this is an array with signs:
$signs = array();
$signs[1]['cz'] = 'Beran';
$signs[1]['en'] = 'Aries';
$signs[2]['cz'] = 'Býk';
$signs[2]['en'] = 'Taurus';
$signs[3]['cz'] = 'Blíženci';
$signs[3]['en'] = 'Gemini';
$signs[4]['cz'] = 'Rak';
....etc
i have to do somethink like it:
$signs.($people[0].sign).($smarty.session.sessdata.lang)
^ array ^ sign from db ^ language from session
but this evidently won't work. have somebody some idea how to solve
this problem?
Jiří Němec, ICQ: 114651500
www.menea.cz - www stránky a aplikace