[snip]
 i'm not sure but i think a tag in html is available which name <code>
and
 </code>
[/snip]

You can also put your code between <pre></pre> tags (pre-formatted text)
I do this to display pre formatted text in text area boxes ....

<h3 class="nomargin"><?php print($rowart->title); // article title
?></h3>
By: <?php print($rowart->name); //article author ?><br>
Published: <?php print($rowart->publish); //article date ?><br>

<?php
$thebody = $rowart->body; // results of the article query from the DB
$thebody = ereg_replace(chr(10).chr(13), "</p>\n<p>", $thebody); //
paragraph seperations

// replace <pre> tages with <textarea> tags
$thebody = ereg_replace("<pre>", "<textarea cols=\"80\" rows=\"10\"
wrap=\"off\">", $thebody);
$thebody = ereg_replace("</pre>", "</textarea>", $thebody);

// print the article out with formatting in place.
print("<p>\n" . $thebody . "\n</p>\n");
?>

HTH!

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to