|
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 |
ube Smarty n00b
Joined: 01 Jul 2003 Posts: 2
|
Posted: Tue Jul 01, 2003 11:51 pm Post subject: Variables in a function? |
|
|
Hi!
I'm having some problems using variables in a function.
[code]{getday day=20030701 assign=day}
{foreach from=$day item=bice}
{$bice.0}<br>
{/foreach}
[code]
Works.
However,
[code]{getday day=$date.full assign=day}
{foreach from=$day item=bice}
{$bice.0}<br>
{/foreach}
[code]
doesn't.
The getday fucntion returns an array in the assign variable.
Any ideas? |
|
Back to top |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Wed Jul 02, 2003 7:35 am Post subject: |
|
|
if you do $smarty->assign('day.full', $value) in php you end up in a variable named "day.full" literally, and not in an array "day" that has a key "full". |
|
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
|