I have a controller and view file, from controller I am setting the data array for view, in the view file I am creating an instance of Mustache.php class and render the template of view.
In the second scenario: from controller I am setting the data array for view, and from view file I am calling Mustache.js to render a template.
Please let me know which is Ideal approach to do the same?
I am using PHP sonic framework(MVC)