MyBB Community Forums

Full Version: Encoding a XHTML php index file.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a index.php page that is a xhtml document, but I can't find a way to use the UTF-8 encoding line without the file trowing a error message.

I have already tried this two lines at the beginning:
<?php echo"<?xml version="1.0" encoding="UTF-8"?>" ?>
<?xml version="1.0" encoding="UTF-8"?>

Can someone please help me out?
(2011-08-08, 06:43 AM)Sama34 Wrote: [ -> ]I have a index.php page that is a xhtml document, but I can't find a way to use the UTF-8 encoding line without the file trowing a error message.

I have already tried this two lines at the beginning:
<?php echo"<?xml version="1.0" encoding="UTF-8"?>" ?>
<?xml version="1.0" encoding="UTF-8"?>

Can someone please help me out?

You need to escape your double quotes if you're using it in a PHP statement, like so:
<?php echo"<?xml version=\"1.0\" encoding=\"UTF-8\"?>" ?>
<?xml version="1.0" encoding="UTF-8"?>
Thanks fizz, it is working now Smile
NP, feel free to +rep me Wink
OFF TOPIC : ^ that's already done Wink