*** Additions to the previous message ***
To change the style directly from a CSS file, it is recommended to only go through classes instead of hard-coding it.
<?php
$functions = array("default", "html", "keyword", "string", "comment");
foreach ($functions as $value) {
ini_set("highlight.$value", "highlight-$value;");
}
$content = highlight_file($filename, true);
$content = highlight_string($string, true);
foreach ($functions as $value) {
$content = preg_replace("/style=\"color: highlight-$value;\"/", "class=\"highlight-$value\"", $content);
}
?>
And in the CSS file (for example) :
.highlight-html { color: #000000; }
.highlight-default { color: #0000bb; }
.highlight-keyword { color: #007700; font-weight: bold; }
.highlight-string { color: #dd0000; }
.highlight-comment { color: #ff8000; }