If I have an index.php file with str_replace or preg_replace. How can I do a text search on a template file like:
str_replace("%title%", "Smart Title", require_once("template/index.tpl"));
If I have an index.php file with str_replace or preg_replace. How can I do a text search on a template file like:
str_replace("%title%", "Smart Title", require_once("template/index.tpl"));
Instead of require_once use file_get_contents.
echo str_replace("%title%", "Smart Title", file_get_contents("template/index.tpl"));