Note: For the impatient, here's a direct link to the example that highlights itself:
http://shiflett.org/code/highlight.php
As I mentioned in the previous post, shiflett.org is being redesigned and redeveloped from the ground up. (Nope, it's not finished yet; you'll know it when you see it.) One of the things I want to improve is commenting. This blog has been getting a lot of comments, and I really appreciate that. (Thanks!) Since the topics I talk about (PHP, MySQL, etc.) are technical, I want to let you add formatted code listings to your comments.
I've been playing with this tonight. Feel free to follow along as
I go. The first thing you want to do is create an ordered list
from the code you want to format ($code in these …