Jump to content

PHP/MSSQL find and replace help


DJ Unique

Recommended Posts

Hi,

 

I need some help finding and replacing content from a field in a mssql database. I have a mssql database called mp3_players. I have a column called web_content and in that column I have loads of XML text. Basically, I have the following XML stored in the web_content column:

 

 

<text id="0" guid="997ba35c-6a7a-4578-8076-2140b3c9e834" name="Description"><![CDATA[Apple iPod]]></text>

 

I want to be able to search web_content for the above line and store everything from name=" to </text> in a PHP variable. Then extract the description, whatever it might be, in this case its an Apple iPod, and store that as a separate variable. Then I want to replace the description with another variable that might be something like Apple iPod 80GB.

 

Any suggestions on how I can do this?

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/88368-phpmssql-find-and-replace-help/
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.