Thread: Phphighlight
View Single Post
  #4 (permalink)  
Old 12-21-03, 02:42 PM
AjoëlD AjoëlD is offline
Newbie Coder
 
Join Date: Dec 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Yes, but i already found it.
If anyone is interested in this to, here's the code :

PHP Code:

<?php 

$code
='php code comes here'
//fuctie van highlight 
function return_highlight($buffer){    
  
ob_start();    
  
highlight_string($buffer);    
  
$chaine ob_get_contents();    
  
ob_end_clean();    
  return 
$chaine;    
}    
if (isset(
$code))    
{    
  
$result=return_highlight(stripslashes($code));    
}    
?>
<?
echo "<font style=\"font-size: 11px;\" face=\"Verdana\" color=\"#000000\">\n";
echo 
"$result\n";
echo 
"</font>\n";
?>
Reply With Quote