i use parser library in codeigniter templates. assume have below html code
<html><body><p>hello {name}</p></body></html>
and controller is:
$data['name'] = 'jason'; $this->parser->parse('view',$data);
now want use function in html code below:
<html><body><p>hello **strtolower({name})**</p></body></html>
is possible use function in parse tag?
you can use code :
public function home_page() { $theme = "<html><body><p>hello".strtolower("'{name}'")."</p></body></html>"; $frame = $this->parser->parse($theme, array('name'=>'deny'), true); $this->parser->parse("index-page.html", $frame); }