High Brightness Display PHPSource code
<? PHP
Function heighphpcode ($ heightstring ){
Do {
$ Z = 0;
If (preg_match ('/<phpcode> (.*?) </Phpcode>/s', $ heightstring, $ REG )){
$ Z = 1;
$ Code = '';
Ob_start ();
Highlight_string ($ Reg [1]);
$ Code = ob_get_contents ();
Ob_end_clean ();
$ Reg [1] = addslashes ($ Reg [1]);
$ Heightstring = preg_replace ("/<phpcode> (.*?) </Phpcode>/s "," $ code ", $ heightstring, 1 );
}
} While ($ Z );
Return $ heightstring;
}
######################################## ######################################## ##########
# $ Phpcode is to be highlighted Code
$ Phpcode = <End
<Phpcode>
<? PHP
Function heighphpcode ($ heightstring ){
Do {
$ Z = 0;
If (preg_match ('/<phpcode> (.*?) </Phpcode>/s', $ heightstring, $ REG )){
$ Z = 1;
$ Code = '';
Ob_start ();
Highlight_string ($ Reg [1]);
$ Code = ob_get_contents ();
Ob_end_clean ();
$ Reg [1] = addslashes ($ Reg [1]);
$ Heightstring = preg_replace ("/<phpcode> (.*?) </Phpcode>/s "," $ code ", $ heightstring, 1 );
}
} While ($ Z );
Return $ heightstring;
}
</Phpcode>
End;
######################################## ######################################## ##########
Echo heighphpcode ("$ phpcode ");
?>