SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict kivison's Avatar
    Join Date
    Dec 2004
    Location
    Whitley Bay, Tyne & Wear, UK
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Escaping the PHP quotes

    Hi Gurus

    I have a script where I have to output an XML file. Now , I have th efile working and FTPing up to the server but for one issue, and I dont know if this is an issue or not (maybe someone can help)

    the first line of the XML file is
    <?xml version="1.0" encoding="ISO88591"?>

    which might look straight forward but PHP sees <? and ?> as a cue to execute php code. All I get away with is this-
    <xml version="1.0" encoding="ISO88591">

    Someone may tell me that this will work but now for the problem.

    I have tried escaping the characters with \<? and <\? but to no avail. So my question is how do you escape these characters when they are together.

    Thanks in advance

    Keith
    Last edited by kivison; Oct 16, 2006 at 01:20. Reason: updating email notification

  2. #2
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <?php echo '<?xml version="1.0" encoding="ISO88591"?>'?>

  3. #3
    SitePoint Addict kivison's Avatar
    Join Date
    Dec 2004
    Location
    Whitley Bay, Tyne & Wear, UK
    Posts
    246
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Red face

    Ah Ha

    The old single / double quotes thing!

    How could I be so stupid!

    Thanks


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •