I have this function:
function &highlight_code($langName, $codeText)
{
$text = 'This is $langName code.';
return $text;
}
And I'm calling it like this:
$patterns[] = "/\[code=(['\"]?)([^\"'<>]*)\\1](.*)\[\/code\]/sU";
$replacements[] = "'<div class=\"xoopsCode\"><code><pre>'.highlight_code('\\2','\\3').'</pre></code></div>'";
If passed
xxx
, the results should be:
This is php code.
but I'm getting:
'.highlight_code('vb','xxx').'
Anyone see why? Thanks, Jeremy