bcoffin Posted August 29, 2006 Share Posted August 29, 2006 Does anybody know a good script to recursively process/assign smarty variables?This is what I'd like to do...foreach($vals as $k=>$v) { if(is_array($v)) { foreach($v as $ak=>$av) { $this->smarty->assign(array($k[$ak] => strtoupper($av))); } } else { $this->smarty->assign(array($k => strtoupper($v))); }}..however, I would like it to process all levels of an array, no matter how deep... ideas? Link to comment https://forums.phpfreaks.com/topic/19059-recursive-assign/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.