Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4021804
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T10:23:49+00:00 2026-05-20T10:23:49+00:00

I have a table in my database (Mysql) which has 6 columns. I am

  • 0

I have a table in my database (Mysql) which has 6 columns. I am using PHP forms to store the data in this database. One of the column is for url. I am able to store the data in the database and now I want to construct an XML document with the URL as the data.

Database name: probe_config
table name   : webmeasurementsuite

My database details are as follows:

url:(varchar,binary and the default value is null)
replication:(integer,unsigned,zerofill and default value is null)
wait:(integer,unsigned,zerofill and default value is null)
timeout:(integer,unsigned,zerofill and default value is null)
clearcache:(varchar,binary and default value is null)
name:(varchar,binary and default value is null)
id  :(integer,notnull,autoinc,unsigned,zerofill and default value is null)

Can anyone help me in converting this to xml document?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T10:23:49+00:00Added an answer on May 20, 2026 at 10:23 am

    Once you get your database results as an array, you can use a function like this to convert that array into an XML document. But do not assume such a function is best performance-wise or software design wise.

    Assuming that your database connection is already done,

    $sth = $dbh->prepare("SELECT url FROM webmeasurementsuite");
    $sth->execute();
    $result = $sth->fetchAll();
    
    $xml = '<?xml version="1.0" encoding="UTF-8"?>';
    
    foreach ($result as $v) {
        $xml .= '<url>'.htmlspecialchars($v['url'], ENT_COMPAT, 'UTF-8').'</url>';
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Datetime vs Timestamp? I have a Mysql table, which has a column
I have a table which has several ID columns to other tables. I want
I have a CSV export script (enrdata_arch.php) which calls information from an existing database
I am developing a script in my localhst using PHP and mysql and I
I'm currently using mysql w/ PHP because that's what I learned and haven't ever
Here is the scenario 1. I have a table called items, inside the table
Here is the scenario: I get an CSV file, which has data1, data2, data3,
I'm writing a web interface to MySQL that executes a couple queries and returns
I want to list the recent activities of a user on my site without
I am working on a site similar to Craigslist where users can make postings

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.