Re: Outputting text "<?" how to?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tedd wrote:
Merlin:

First the syntax should be:

<?xml version="1.0" encoding="ISO-8859-1" ?/>  <-- note the close /

No, that is invalid XML. The specification is available at http://www.w3.org/TR/XML11 (and makes riveting reading! ;)

[snip]
If you want to print it to a web page, try:

<?php
$a=<<<EOD
&lt;?xml version="1.0" encoding="ISO-8859-1" ?/>
EOD;
echo($a);

echo '&lt;?xml version="1.0" encoding="ISO-8859-1" ?>';

would work just as well and is a hell of a lot easier to look at. That's assuming you actually want it to appear on the page for the user to see, if you want the browser to interpret it you'll have to change the &lt; at the start to a <

--
Jasper Bryant-Greene
General Manager
Album Limited

http://www.album.co.nz/     0800 4 ALBUM
jasper@xxxxxxxxxxx          021 708 334

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux