Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

[PHP] XML output query

Options
  • 07-05-2006 1:05pm
    #1
    Registered Users Posts: 3,514 ✭✭✭


    i have a php file rendering a xml file. I need the xml file to be outputted in the following form
    <song name ="name" band ="band" file="file.mp3" />
    
    

    The php file queries the db for the above fields. The php code i had was this

    [PHP]$xml_output .= "\t\t<band>" . $row . "</band>\n";[/PHP]

    however that outputed the xml as
    <band>band</band>
    

    how do i alter the php code to get the desired output? Trying to do a 3 column output instead of a single output.
    thanks


Comments

  • Closed Accounts Posts: 30 Mr. Magoo


    This should do it
    [PHP]
    $xml_output .= '<song name ="'. $row . '" band ="' . $row . '" file="' . $row . '" />';
    [/PHP]


Advertisement