i have an array of strings, contained in an array of arrays here;
$this->_storage[$block]
i also have an array of name value pairs here;
$args
now, what i want to do is loop through the array of strings, and for each line replace any instances of the second array's ($args) keys, with the second array's ($args) values.
make any sense? im new to php, been on this a while now. i just cant seem to get the logic sorted.
as you can see ive tried debugging but im a bit stuck.
public function parse($block,$args='')
{
foreach ($this->_storage[$block] as $k => $v) {
//echo $k.' '.$v;
foreach ($args as $key => $value) {
$tmp = str_replace('{'.$key.'}',$value,$v);
}
//$a .= $tmp;
}
//$b = $a;
//echo $b;
}