note 74015 deleted from function.highlight-file by bobby

From: Date: Wed, 21 Mar 2007 15:04:29 +0000
Subject: note 74015 deleted from function.highlight-file by bobby
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-124674@lists.php.net to get a copy of this message
Note Submitter: management at twilightus dot net ---- Here's a better take at highlighting a file with line numbers: <style type="text/css"> .num { float: left; color: gray; text-align: right; margin-right: 6pt; padding-right: 6pt; border-right: 1px solid gray;} </style> <?php function highlight_num($file) { echo '<div class="num"><code>'; for ($i = 1; $i <= count(file($file)); $i++) { echo "$i<br />"; } echo '</code></div>'; highlight_file($file); } highlight_num('file.php'); ?>

« previous php.notes (#124674) next »