treehouse : what would you like to learn today?
Web Design Web Development iOS Development

This php code at the top of my page

  • <?php echo '<?xml version="1.0" encoding="utf-8"?'.'>'; ?>

    what is this code doing ? It screws up the positioning of my page in ie6.
    I digged into the css files and everything is correct (i'm very certain) as i'm somewhat competant with css.
    The almost giving up i resort to deleting line by line of code and i noticed <?php echo '<?xml version="1.0" encoding="utf-8"?'.'>'; ?>
    right at the top of my page. What is this and why is it distrupting my page layout in ie6.

    After removing it, my page works fine across all browsers.
  • The bit of code your looking at handles the character encoding.

    For instance if you were to type a normal english pound sign then it would appear. Without this code it would display a funky capital A kind of thing. If you can guarentee that all your symbols are entered correctly like the &Pound ascii character.
  • same code was on my page. thanks for your answer!
  • Happy to help