[snip]
...lots of stuff from lots of messages...
[/snip]
If you need to display PHP code in an HTML page and have it validate
properly you need to use the following;
<? php ?> which will properly display as
<? php ?>
As a matter of course it is typical to use < (<) and > (>) along with
a set of pre-formatted tags (<pre></pre>) when using HTML to display code.
Many online magazines have adopted this syntax for code display. Therefore;
<pre>
<? php
//lots of code here
if(foo == bar){
do some stuff;
}
else {
do other stuff;
}
//now do some HTML
print("<title>" . $title_variable . "</title>")
?>
</pre>
will display the code block and its comments properly in an HTML page.
HTH!
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php