zengun

weblog

20020829

PHP numbered code listing, updated

I was looking at some thread in /boardom that had a little code nested between [php] and [/php] tags, and thought about how it would be cool if one could just specify the start of the line numbering.

After a bit of asking around and googling, it turns out <ol> accepts a start= argument.
So, here’s an updated version of my PHP line-numbering highlight functions, that make the functions accept a second argument $start_line.
I’ll just have to hack a start= argument in my phpBB’s [php] tags, and it will be just wonderful.


one response

  1. that’s cool michel. that way we won’t have to paste entire code to get to a specific line. :)

    #1 michael b2002/08/29 at 2:35

Your words


Required fields:
Are marked by this sign: *
XHTML:
You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
On comment spam/irrelevance:
Your comment may be moderated or considered as spam by the leprechauns running this server. If you get a 412 error or a mean message, it may be that they thought it was spam: try wording the comment differently or remind me to put up a contact form so you can warn me about the problem.
Of course, once the leprechauns are done doing their magic, I reserve the right to delete any comment for any reason.