Jump to content

Creating XML Code with PHP


BlueEyes

Recommended Posts

ok guys, i want to create some xml code with php. My code looks like this:

 

$send_xml='<?xml version="1.0" encoding="ISO-8859-1" ?>'."\n".

      '<xml><bob version="1.0">'."\n".

    ' <test1>'.$test1.'</test1>'."\n".

    ' <test2>OK</test2>'."\n".

    '</bob></xml>'."\n";

 

}

 

 

  echo $send_xml;

 

 

but the firefox wont show it as an xml tree, neither does the internet explorer. what am i missing here? btw, when i save the particular page as .xml it works.

Link to comment
https://forums.phpfreaks.com/topic/47022-creating-xml-code-with-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.