[eluser]Unknown[/eluser]
The explanation in the manual, but I don't know if the $string = $this->parser->parse ('blog_template', $data, TRUE) role, its return value generally in what circumstances be used?While the $this->parser->parse_string () method and under what circumstances?
Quote:$this->parser->parse()
This method accepts a template name and data array as input, and it generates a parsed version. Example:
$this->load->library('parser');
$data = array(
'blog_title' => 'My Blog Title',
'blog_heading' => 'My Blog Heading'
);
$this->parser->parse('blog_template', $data);
The first parameter contains the name of the view file (in this example the file would be called blog_template.php), and the second parameter contains an associative array of data to be replaced in the template. In the above example, the template would contain two variables: {blog_title} and {blog_heading}
There is no need to "echo" or do something with the data returned by $this->parser->parse(). It is automatically passed to the output class to be sent to the browser. However, if you do want the data returned instead of sent to the output class you can pass TRUE (boolean) to the third parameter:
$string = $this->parser->parse('blog_template', $data, TRUE);
$this->parser->parse_string()
This method works exactly like parse(), only accepts a string as the first parameter in place of a view file.