how to make call xml file in php runtime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hina siddiqui
    New Member
    • Dec 2011
    • 1

    how to make call xml file in php runtime

    hi, how to create a XML file in php and run time on a browser php generate this XML file. i cannot understand how i perform it please guide me.thanks in advance.
  • AutumnsDecay
    New Member
    • Mar 2008
    • 170

    #2
    What are you trying to use this XML for? Are you trying to take information from a user and store it in a new XML page, or do you simply need PHP to render as an XML file on the fly?

    If you want PHP to render information as XML at run time, you can do something like:

    Code:
    <?php
    header('Content-type: application/xml');
    print "<root>";
    print "\t <parent>";
    print "\t\t <child>Value</child>";
    print "\t </parent>";
    print "</root>";
    
    ?>
    You can use PHP + MySQL or Form variables to compile the XML sheet as you need.

    Comment

    Working...