> 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. <? $fp = fopen('example.php','r'); $file = fread($fp,filesize('example.php')); $h_file = highlight_string($file,TRUE); $h_file = str_replace("<code>","<code>1 ",$h_file); $count=2; $nh_file = preg_replace("/<br \/>/e",'"<br />".$count++." "',$h_file); echo $nh_file; ?> ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php