php-general | 2001092
Date: 09/30/01
- Next message: John Lim: "[PHP] oci8.max_links missing from php.ini"
- Previous message: sagar N Chand: "[PHP] sock prob"
- In reply to: David Otton: "Re: [PHP] XHTML and PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
David, it works now! Matt Dreer pointed the solution out to me as well. I
should have used:
<?php echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); ?>
Thanks to both of you! One more simple question. I would like to understand
how and why this renders correctly. I look at this script and to me there is
no difference between:
<? echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); ?> and the correct
solution noted above. Can someone explain this phenomenon to me? Thanks
again in advance...
Navid Yar
-----Original Message-----
From: David Otton [mailto:djo <email protected>]
Sent: Saturday, September 29, 2001 2:36 PM
To: Navid Yar
Cc: php-general <email protected>
Subject: Re: [PHP] XHTML and PHP
On Sat, 29 Sep 2001 13:13:24 -0500, you wrote:
>>>The first line of an XHTML document must include an XML processing
>>>instruction, as such:
>>><?xml version="1.0" encoding="UTF-8"?>
>>>But PHP will parse it as PHP code because of the question marks. How do I
>>>get around this problem? I don't want PHP to read that element as PHP, I
>>>want it to leave it alone the way it is. I tried echoing the tag and
>><? echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); ?>
>That approach doesn't work. It treats the string literally and prints:
>
><? echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); ?> in the HTML.
>
>Thanks for trying to help...
Weird - it works for me (WML stuff). Are you certain "short tags" is
set to "on" in the .ini? And other code parses ok?
Have you tried :
<?php echo("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"); ?>
djo
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: John Lim: "[PHP] oci8.max_links missing from php.ini"
- Previous message: sagar N Chand: "[PHP] sock prob"
- In reply to: David Otton: "Re: [PHP] XHTML and PHP"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

