Ok, im trying to find out how to color the code of php code onces echo'd or print'd out in a table..
any clues or sites, codes?
-thanx
Ok, im trying to find out how to color the code of php code onces echo'd or print'd out in a table..
any clues or sites, codes?
-thanx
hey thanx
very simple
<?
function showsource ($code) {
ob_start();
highlight_string($code);
$colorsource = ob_get_contents();
ob_end_clean();
//$colorsource = str_replace (" ", " ", $colorsource);
return $colorsource;
}
$plain_code = "
<?
function showsource ($code) {
ob_start();
highlight_string($code);
$colorsource = ob_get_contents();
ob_end_clean();
return $colorsource;
}
echo showsource($plain_code);
?>
";
echo showsource($plain_code);
?>