Here is what I did to get past the double quote:
function highlight_code ($langName, $codeText)
{
$langName = strtolower($langName);
require_once XOOPS_ROOT_PATH."/colorcode/HColor_Core.php";
if ($langName == 'php'){
$codeText = str_replace('\\','\\\\',$codeText);
$codeText = highlight_string("<?$codeText?".">", TRUE);
$codeText = str_replace('\\\\','\\',$codeText);
return $codeText;
}else{
$HColor = new HColorCore;
$codeText = $HColor->HighlightColor($langName,$codeText);
return $codeText;
}
}
Now, I'm getting this as the output when $codeText = the function:
function highlight_code ($langName, $codeText)
{
$langName = strtolower($langName);
require_once XOOPS_ROOT_PATH."/colorcode/HColor_Core.php";
if ($langName == 'php'){
$codeText = str_replace('\','\\',$codeText);
$codeText = highlight_string("<?$codeText?".">", TRUE);
$codeText = str_replace('\\','\',$codeText);
return $codeText;
}else{
$HColor = new HColorCore;
$codeText = $HColor->HighlightColor($langName,$codeText);
return $codeText;
}
}
On the output...you'll notice that the "\" became "\" and "\\" became "\". Do you know why this is happening? Thanks, Jeremy