> 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
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
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
3 matches
Mail list logo