Currently I am use the slim framework to serve html templates to the browser. After the view is loaded the application retrieves some information from a RESTful API and uses handlebars.js to populate various aspects of the DOM.
I would like to use a php template system such as mustache.php or twig to handle some very basic template needs when the html template is being served. However, being handlebars.js uses the same syntax as mustache.php and twig I am having some major conflicts when it comes time to populate the DOM with the information retrieved from the API.
The only solution I have at the moment is to do a str_replace() on the html template instead of using one of the above php templating solutions.
Is there a way I can use one of the php templating solutions and handlebars.js without conflicts?