I have a webpage that contains an iframe. I'm opening text files into that frame and I want to highlight java code in the text. I've googled syntax highlighters and came across geshi. Thing is I dont know much about php so I'm a bit confused as to how to use it even with the instructions for basic use.
Here's the how to bit about the highlighter.
//
// Include the GeSHi library
//
include_once 'geshi.php';
//
// Define some source to highlight, a language to use
// and the path to the language files
//
$source = '$foo = 45;
for ( $i = 1; $i < $foo; $i++ )
{
echo "$foo\n";
--$foo;
}';
$language = 'php';
//
// Create a GeSHi object
//
$geshi = new GeSHi($source, $language);
//
// And echo the result!
//
echo $geshi->parse_code();
Can anyone explain how I use that in relation to the following bit of HTML ?
<a href="page1.txt" target="iframe" onClick="showFrame()">Link to page 1</a>