|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
setcookie Smarty Rookie
Joined: 29 Aug 2006 Posts: 6
|
Posted: Tue Sep 12, 2006 7:07 am Post subject: trying to index arrays with smarty variable |
|
|
i found this in the manual {$foo.$bar} or even {$foo[4].$baz}
unfortunatly this doesnt work? in my case
$GLOBAL.SUBNAVI.$GLOBAL.PG
Warning: Illegal offset type in ...
can someone please explain why this simply array indexing via variable is not working? something so elementary?
fra* |
|
Back to top |
|
Hielke Hoeve Smarty Elite
Joined: 06 Jan 2006 Posts: 406 Location: Netherlands
|
Posted: Tue Sep 12, 2006 9:17 am Post subject: |
|
|
Because you are trying to access another sub value after the $GLOBAL? Try this:
$GLOBAL.SUBNAVI[$GLOBAL].PG
or
$GLOBAL.SUBNAVI.[$GLOBAL.PG]
whichever you meant.
In my problem
$_SESSION.user.pageaccess.lots.*
or
$_SESSION.user.pageaccess.lots[*]
doesnt work, while I do need to check this entry _________________ Debug XHTML Compliance
SmartyPaginate
Smarty License Questions
---
(About Unix) The learning curve is full of aha! moments, such as that glorious day that the full beauty of grep and, later, find is revealed in all its majesty. --- Robert Uhl <ruhl@4dv.net> |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|