|
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 |
spaze Smarty n00b
Joined: 24 Jan 2004 Posts: 1
|
Posted: Sat Jan 24, 2004 12:33 am Post subject: applying modifier to a multidimension array? |
|
|
hi,
when i try i.e. (simplified)
$array[0]['foo'] = 'bar';
$array[0]['bar'] = 'foo';
$array[1]['foo'] = 'bar';
$array[1]['bar'] = 'foo';
..
{foreach from=$array|escape item=value}
{$item}
..
then the escape modifier is run only on the first "dimension" of the array (looking into compiled template - looks something like:
is_array($array) ? _run_mod_handler : call_modifier)
but _run_mod_handler() doesn't "descend" to another dimension.
i think it would be useful, when _run_mod_handler would seem like this:
foreach ($array as $value)
if is_array($value)
_run_mod_handler($value)
else
call_modifier()
I hope you got the point |
|
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
|