note 56517 deleted from language.basic-syntax by mazzanet
| From: | mazzanet@php.net | Date: | Tue, 06 Sep 2005 07:25:55 +0000 |
| Subject: | note 56517 deleted from language.basic-syntax by mazzanet | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-94783@lists.php.net to get a copy of this message | ||
Note Submitter: PHX
----
About the XML declaration, I prefer the methods which use echo, like the already provided:
<?php echo('<?xml version="1.0"
encoding="iso-8859-1"?'.'>'); ?>
and
<?php echo("<?xml version=\"1.0\"
encoding=\"iso-8859-1\"?>"); ?>
However, I am a newbie and test my documents in a Windows PC without PHP so the browser displays the
next characters, respectively:
'); ?>
and
"); ?>
In order to avoid them, I change the extension of my files from html to xhtml which solves the
problem in the first case and produces a XML parsing error in the second; but that error can be
avoided too using a space to divide the end tag of the XML declaration:
<?php echo("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?
>"); ?>
Of course I make the FTP program change the extension of the files from xhtml to php during
transfers.