[eluser]Sara rad[/eluser]
this way workd but im looking for better way :
Code:
$data['content'] = '<p style="color:red;">Hi {username} , welcome to our site</p>';
$fh = fopen('application/views/file.tpl', 'w') or die("can't open file");
fwrite($fh, $data['content']);
fclose($fh);
$data['username'] = 'sara';
$this->parser->parse('file.tpl',$data);