cmgmyr Posted July 4, 2006 Share Posted July 4, 2006 I am working on adding some tutorials to my personal site. When I add in php (for example) I want it to be formatted like it is in here or in coding software with the different colors and everything. Currently I have tinyMCE as the editor for the tutorials. I have tried the php plugin for it...which doesn't do anything. Is there something that I can use, or make, in order to have the text output in the colors that they should?Thanks,-Chris Quote Link to comment https://forums.phpfreaks.com/topic/13604-outputting-php-colors/ Share on other sites More sharing options...
micah1701 Posted July 4, 2006 Share Posted July 4, 2006 you want to check out the highlight_string() and highlight_file() functions built into PHP.should do what you want.[url=http://us3.php.net/highlight_string]http://us3.php.net/highlight_string[/url] Quote Link to comment https://forums.phpfreaks.com/topic/13604-outputting-php-colors/#findComment-52730 Share on other sites More sharing options...
cmgmyr Posted July 4, 2006 Author Share Posted July 4, 2006 I tried that out and it did half of what it it supposed to do. How do I get rid of the extra tags that show up without messing anything else upHere is the screen shot[attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/13604-outputting-php-colors/#findComment-52926 Share on other sites More sharing options...
cmgmyr Posted July 4, 2006 Author Share Posted July 4, 2006 Nevermind...I got it.What I had to do was manually add in the BB PHP tags, then when I output it I search for those and replace with the highlight string.Let me know if anyone wants my code-Chris Quote Link to comment https://forums.phpfreaks.com/topic/13604-outputting-php-colors/#findComment-52930 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.