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

2003-04-04 Thread John W. Holmes
> I've been trying to add line-numbers to my source code, but can't seem to > work out how to do it. This works. The line numbers end up colored the same as the line, though. ","1 ",$h_file); $count=2; $nh_file = preg_replace("//e",'"".$count++." "',$h_file); echo $nh_file; ?> ---John W. Hol

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

2003-04-03 Thread Tom Rogers
Hi, Friday, April 4, 2003, 3:27:55 PM, you wrote: AM> I've been trying to add line-numbers to my source code, but can't seem to AM> work out how to do it. AM> As an example, I tried the following: AM> function addPrefix( $matches ) AM> { AM> static $line = 1; AM> return $line++ . $matc

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

2003-04-03 Thread Burhan Khalid
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, I tried the following: function addPrefix( $matches ) { static $line = 1; return $line++ . $matches[0]; } $url = split("\?", $_GET['url']); $source = high