Is there a tutorial one how to color the fonts?
Posted: Sat Jul 29, 2006 7:54 pm
Is there any kind of online tutorial (I googled it with no luck) that will teach me how to create something similar to the effect of the [code ) tag?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
tags only do one color: green. Maybe you're more referring to theCode: Select all
or [syntax] tags? They are powered by [url=http://qbnz.com/highlighter/]Geshi[/url].
theCode: Select all
tags are basically a glorified <pre> tag with some style settings on the font's color via CSS.Code: Select all
$row = mysql_fetch_array($results);
$content = $row['content'];
$title = $row['title'];
echo "<tr><td><p><font size='+6'>".$title."</font></p></td></tr> ";
echo str_replace("\t", ' ', nl2br("<tr id='content_area'><td>".$content."</td></tr>"));
$source =
"//source";
$lan = 'java5';
$geshi =& new GeSHi($source, $lan);
$geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
echo $geshi->parse_code();