note 27619 deleted from function.show-source by aidan
| From: | aidan@php.net | Date: | Sun, 26 Sep 2004 14:11:06 +0000 |
| Subject: | note 27619 deleted from function.show-source by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77399@lists.php.net to get a copy of this message | ||
Note Submitter: noel at noeljackson dot com
----
function highlightcode($file){
ob_start();
show_source( "$file" );
$t = ob_get_contents();
ob_end_clean();
$t = ereg_replace( "<font" , "<span" , $t);
$t = ereg_replace( "</font>", "</span>", $t );
$t = ereg_replace( "color=\"", "style=\"color:", $t);
echo $t;
}
Use this instead of show_source, it will give you valid XHTML 1.1.