note 24012 deleted from function.show-source by aidan
| From: | aidan@php.net | Date: | Sun, 26 Sep 2004 14:11:15 +0000 |
| Subject: | note 24012 deleted from function.show-source by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-77401@lists.php.net to get a copy of this message | ||
Note Submitter: aaron at aaron-wright.com
----
[editors note: str_pad() function could be a rather elegant solution]
Not to sound picky or anything, but the first example of the line-numbering is great, but this is
the one change
that (in my opinion) makes it perfect:
$source[$i] = "<code>[$i]".str_repeat("<span style=\"color:
#ffffff\">0</span>", 4 - strlen ($i))."</code>$source[$i]<br
/>";
That combines the second comment of not setting the lines crooked and the original idea into one.
The zeros used as placeholders are matched to the background-color (white, usually...) so you
don't have to stare at them.