Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

applying modifier to a multidimension array?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
spaze
Smarty n00b


Joined: 24 Jan 2004
Posts: 1

PostPosted: Sat Jan 24, 2004 12:33 am    Post subject: applying modifier to a multidimension array? Reply with quote

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 Wink
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Feature Requests All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP