jonoc33 Posted May 6, 2008 Share Posted May 6, 2008 Hey guys, I've made a site called Codebase and it's basically a personal site for my use where I can add and view code that i've used. I've already done pretty much everything for it, but when it displays the code is there any way of making it show up with colors like this: <?php echo "I need these colours etc."; ?> Is there some sort of mod you can get to make it display this? Jono Link to comment https://forums.phpfreaks.com/topic/104334-php-code-colors/ Share on other sites More sharing options...
Coreye Posted May 6, 2008 Share Posted May 6, 2008 Have you tried http://www.php.net/highlight_string? Link to comment https://forums.phpfreaks.com/topic/104334-php-code-colors/#findComment-534168 Share on other sites More sharing options...
jonoc33 Posted May 6, 2008 Author Share Posted May 6, 2008 I did. It only returns the coding of the colours, not what you've inputted though. Link to comment https://forums.phpfreaks.com/topic/104334-php-code-colors/#findComment-534169 Share on other sites More sharing options...
wildteen88 Posted May 6, 2008 Share Posted May 6, 2008 The easiest way to get syntax highlighting is either use the PEAR highlighter class (if your version of PHP has PEAR Installed) or download and install Geshi. Link to comment https://forums.phpfreaks.com/topic/104334-php-code-colors/#findComment-534489 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.