try this: ob_start(); $oldlevel=error_reporting(0); highlight_file($file); error_reporting($oldlevel); $buffer = ob_get_contents(); ob_end_clean();
$buffer = str_replace("<code>", "", $buffer); $buffer = str_replace("</code>", "", $buffer); $buffer = preg_replace("/<font color=\"([^\"]*)\">/i","<span style=\"color: \\1\">",str_replace("</font>","</span>",$buffer)); echo $buffer; > I want to use highlight_file() in XHTML Strict. Is there any way to > change PHP to use <span class="string"> (and other classes) and use a > stylesheet to colour it? If not, any other suggestions? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php