communication
 databases
 directories
 file handling
 html and code
 image editing
 image listing
 sessions and co
 string handling
 information
 forms
 apple stuff
 image handling
 array handling
 lixlpixel
php - snippets
google search terms detected and highlighted.
remove highlighting | keep highlighting
make snippet in "html and code" - download "simple php code highlight" - open demo of "simple php code highlight"
 search
php - snippets

Valid CSS!

php webring logo
prev next
random list
join the Ring!

html and code - simple php code highlight was created/last modified on Tue 20 Apr 2004 4:32 PM

this snippet highlights a php file and numberes the lines.
show php code in a nice layout.
     
<?php
      
echo '
      <table border="0" cellspacing="0" cellmargin="0">
        <tr>
          <td style="background-color:#D4D4D4;padding-right:5px;padding-left:5px;text-align:right;vertical-align:top;">
             <pre>'
;
      
$temp=file("index.php");
$n=count($temp);
while(
$i<$n)
{
          
$i++;
          echo
"$i\n";
}
      
echo
'
              </pre>
          </td>
          <td style="background-color:#FFFFFF;padding-right:5px;padding-left:5px;vertical-align:top;">'
;
highlight_file("index.php");
echo
'
          </td>
        </tr>
      </table>
'
;
      
?>

learn more about some of the PHP functions used in this snippet: align, count, echo, file, highlight_file, ord, round, while

view the GNU general license - view the GNU library license - search on PHPsnippets - see your code like this

 a lixlpixel.com site

PHParadise.com - PHP-classes.org - your site on safari