[PHP] How can I formated a PHP script into colored HTML
Hi! How can I make a code into html format like this ?php $foo = 5bar; // string $bar = true; // boolean settype($foo, integer); // $foo 5 (integer) settype($bar, string); // $bar 1 (string) ? TABLE BORDER=0 BGCOLOR=#E0E0E0 CELLPADDING=5 TR TD code font color=#00 font color=#BBlt;?phpbr /$foo /fontfont color=#007700= /fontfont color=#DD5bar/fontfont color=#007700; /fontfont color=#FF8000// stringbr //fontfont color=#BB$bar /fontfont color=#007700= /fontfont color=#BBtrue/fontfont color=#007700;nbsp;nbsp;nbsp;/fontfont color=#FF8000// booleanbr /br //fontfont color=#BBsettype/fontfont color=#007700(/fontfont color=#BB$foo/fontfont color=#007700, /fontfont color=#DDinteger/fontfont color=#007700); /fontfont color=#FF8000// $foo 5nbsp;nbsp;nbsp;(integer)br //fontfont color=#BBsettype/fontfont color=#007700(/fontfont color=#BB$bar/fontfont color=#007700, /fontfont color=#DDstring/fontfont color=#007700);nbsp;nbsp;/fontfont color=#FF8000// $bar 1 (string)br //fontfont color=#BB?gt;/font /font /code/TD /TR /TABLE Shi MuQi LangFang ABC (China) v Tel:(86)-316-6838216 /(_)\ E-mail:[EMAIL PROTECTED] ^ ^
Re: [PHP] How can I formated a PHP script into colored HTML
On Tuesday 28 September 2004 12:40, [EMAIL PROTECTED] wrote: How can I make a code into html format like this You can have a look at the highlight_file() function. -- Jason Wong - Gremlins Associates - www.gremlins.biz Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* Women, deceived by men, want to marry them; it is a kind of revenge as good as any other. -- Philippe De Remi */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How can I formated a PHP script into colored HTML
There's also a pear package that might help you: http://pear.php.net/package/Text_Highlighter Cheers Chris Jason Wong wrote: On Tuesday 28 September 2004 12:40, [EMAIL PROTECTED] wrote: How can I make a code into html format like this You can have a look at the highlight_file() function. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php