This is what I have originally, any help to get this translated to preg_replace_callback will be so much appreciated!
function addtemplateslashes($template)
{
return "?".">".$template."<?php";
}
$template = preg_replace("/\?".">(\r*\n*.*)(<\?php|<\?)/esiU","addtemplateslashes('\\1')",$template);
And this is what I have so far with no luck.
if (!function_exists('parseTagsRecursive')) {
function parseTagsRecursive($template)
{
$regex = '#\/\?".">(\r*\n*.*)(<\?php|<\?)#';
if (is_array($template)) {
$template = $template[1];
}
return preg_replace_callback($regex, 'parseTagsRecursive', $template);
}
}
$template = parseTagsRecursive($template);