
Tired of black and whit coding that looks like what’s above? Want to colorize it to look like this instead:

Here is how to make colorized pretty source code using the .htacess method for .phps files:
Step 1. create a text file and save it as .htaccess. Put the following code in the file:
Step 2. change the filename to .phps from .php
Step 3. navigate with your browser to the .phps and voila!
The nice thing about the htacess method is it works with PHP version 3 files, whereas the two function methods only work with version 4.xx and 5.xx. But who is running PHP version 3 any more? Anybody?
Other ways to highlight PHP source code
If you can’t or don’t want to use the htaccess method for some reason then there are a couple PHP functions that will colorize code called: highlight_string() (PHP 4, 5 only) and highlight_file() (PHP 4, 5 only)

< b >< a href=”http://kedardes.com/wiki/DianeOiwk” >long haircuts< /a >< /b >< /blockquote >
Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! However, how can we communicate?
on February 5th, 2012 at 10:18 pm | #Link Comment