[nycphp-talk] Code Highlighting a Mixed Content (HTML/PHP) File
invisiblemute
geek at invisiblemute.com
Wed Sep 22 15:12:25 EDT 2004
...</lurk>
Did quite a bit of searching and found lots of scripts on sites all around the world to syntax highlight PHP code. What I didn't seem to find was how to do it elegantly with a file of mixed content types without preg_matching, preg_replacing, etc. I thought I could do it with two built in PHP functions but the following fails and doesn't return anything:
<?php
html_entity_decode(highlight_file("some_directory/$file[name]"));
?>
Leaving out the html_entity_decode() it reads in the file but runs an html_entities() on it which I don't want.
Thanks.
</lurk>...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20040922/c1c41a16/attachment.html>
More information about the talk
mailing list