Jump to content

how can i display php source code snippets ?


imarockstar

Recommended Posts

Or php's highlight_ functions -

 

<?php
$file = 'help.php'; // name of file containing php code
$content = highlight_file($file,true); // get and highlight the php code
?>
<style type="text/css">
.code
{
border-style:solid;
border-color:red;
}
</style>
<?php
echo '<div class="code">' . $content . '</div>';
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.