Re: [PHP] Re: Q. Adding line numbers to highlighted source

2003-04-06 Thread Philip Olson
gt; > > > Enjoy! > > > > ---John W. Holmes... > > > > PHP Architect - A monthly magazine for PHP Professionals. Get your copy > > today. http://www.phparch.com/ > > > > > -Original Message- > > > From: Alan McFarlane

Re: [PHP] Re: Q. Adding line numbers to highlighted source

2003-04-06 Thread Alan McFarlane
gt; PHP Architect - A monthly magazine for PHP Professionals. Get your copy > today. http://www.phparch.com/ > > > -----Original Message- > > From: Alan McFarlane [mailto:[EMAIL PROTECTED] > > Sent: Friday, April 04, 2003 12:46 PM > > To: [EMAIL PROTECTED

RE: [PHP] Re: Q. Adding line numbers to highlighted source

2003-04-04 Thread John W. Holmes
D] > Sent: Friday, April 04, 2003 12:46 PM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: Q. Adding line numbers to highlighted source > > Well I finally found a workable solution: > > $url = "index.php"; /* for example */ > $source = explode("",

[PHP] Re: Q. Adding line numbers to highlighted source

2003-04-04 Thread Alan McFarlane
Well I finally found a workable solution: $url = "index.php"; /* for example */ $source = explode("", preg_replace("`\`Ui", "", highlight_file($url, true))); for ($i = 0; $i < count ($source); $i++) $source[$i] = "" . str_pad($i, 5, "0", STR_PAD_LEFT) . " " . $source[$i]; echo "" . implode("

[PHP] Re: Q. Adding line numbers to highlighted source

2003-04-04 Thread Greg Beaver
Hi Alan, Another solution is to use the HighlightParser that comes with phpDocumentor (http://www.phpdoc.org) Regards, Greg -- phpDocumentor http://www.phpdoc.org Alan McFarlane wrote: I've been trying to add line-numbers to my source code, but can't seem to work out how to do it. As an example,