...lots of stuff from lots of messages...

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 &lt; (<) and &gt; (>) 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;

&lt;? php
//lots of code here
if(foo == bar){
        do some stuff;
else {
        do other stuff;
//now do some HTML
print("&lt;title&gt;" . $title_variable . "&lt;/title&gt;")

will display the code block and its comments properly in an HTML page.



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

Reply via email to