Jump to content

What is the quickest way to convert x into y?


Perad

Recommended Posts

This is X

 

<products_description>
        <products_id>1537</products_id>
        <language_id>2</language_id>
        <products_name></products_name>
        <products_description></products_description>
        <products_category></products_category>
        <products_material>Shell</products_material>
        <products_region>Papua New Guinea, PNG</products_region>
        <products_dimensions>C. 5 x 2 1/2 inches</products_dimensions>
        <products_tribal_group></products_tribal_group>
        <products_url></products_url>
        <products_viewed>6</products_viewed>
    </products_description>

 

This is y

('<products_id> Value', 3, '<products_region> Value'),

 

I have to do this several times so understanding how to do this will be very helpful indeed

Link to comment
Share on other sites

Hi,

 

This seems to be a xml file ??

 

if so then you need to parse this xml file .In php5 there are built in support for xml parsing so it would be easier it will give you data in associative array from which you can easily display in your 'Y' format.

 

Regards

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.