The below code responsible for bbcode tags in dle script. "\1" is the link which i would like to call with function, but instead I'm getting plain text
$txt = preg_replace( "#<!--dle_video_begin:(.+?)-->(.+?)<!--dle_video_end-->#is", '[video=\\1]', $txt );
my function
function videoD ($str) {
if (strpos($str,'http://') !== false) {
$vid = uppod_encode($str);
echo (uppod_encode($str));
} else {
$vid = uppod_decode($str);
echo (uppod_encode($vid));
}
}
what i've tried:
$txt = preg_replace( "#<!--dle_video_begin:(.+?)-->(.+?)<!--dle_video_end-->#is", '[video=videoD(\\1)]', $txt );
$txt = preg_replace( "#<!--dle_video_begin:(.+?)-->(.+?)<!--dle_video_end-->#is", '[video=videoD(1)]', $txt );
$txt = preg_replace( "#<!--dle_video_begin:(.+?)-->(.+?)<!--dle_video_end-->#is", '[video=\\videoD(1)]', $txt );