// Highlight any code...
function highlight_php_code($code)
{
// Remove special characters.
$code = un_htmlspecialchars
(str_replace(array('<br />',
"\t",
'['),
array("\n",
'SMF_TAB();',
'['),
$code));
// It's easier in 4.2.x+.
{
}
else
// Yes, I know this is kludging it, but this is the best way to preserve tabs from PHP :P.
$buffer =
preg_replace('~SMF_TAB(?:</(?:font|span)><(?:font color|span style)="[^"]*?">)?\\(\\);~',
'<pre style="display: inline;">' .
"\t" .
'</pre>',
$buffer);
}