public static function parseTemplate($tag, $replacements)
        {
//          get template
            $template = self::getTemplate($tag);
            $search = $replace = array();
//          compile search and replace values for replacement
            foreach ($replacements as $varname => $varvalue)
            {
                array_push($search, '%'.strtolower($varname).'%');
                array_push($replace, $varvalue);
            }
            return str_replace($search, $replace, $template);
        }
public static function parseTemplate($tag, $replacements)
        {
//          get template
            $template = self::getTemplate($tag);
            $search = $replace = array();
//          compile search and replace values for replacement
            foreach ($replacements as $varname => $varvalue)
            {
                array_push($search, '%'.strtolower($varname).'%');
                array_push($replace, $varvalue);
            }
            return str_replace($search, $replace, $template);
        }
public static function parseTemplate ( $ tag , $ replacements ) { //          get template $ template = self :: getTemplate ( $ tag ) ; $ search = $ replace = array ( ) ; //          compile search and replace values for replacement foreach ( $ replacements as $ varname => $ varvalue ) { array_push ( $ search , '%' . strtolower ( $ varname ) . '%' ) ; array_push ( $ replace , $ varvalue ) ; } return str_replace ( $ search , $ replace , $ template ) ; }
A simple templater, replaces %VARNAME% with the value.
@access public
@param array $tag The tag array.
@param array $replacements The array of search and replace values.
A simple templater replaces %VARNAME% with the value .