Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search & replace external file with PHP?

Status
Not open for further replies.

gcrighton

Technical User
Feb 23, 2002
9
ES
Hi,

I need to perform a search and replace on a SQL file with rows as follows:

INSERT INTO productos VALUES("10272","El criticón","306","89,55","85,07","80,6","71,64","","","","","","","");

I need to be able to replace the commas in the prices (89,55 85,07 80,06 & 71,64) as this is causing errors in how the prices are displayed.

Obviously I can't do a standard search and replace because of the commas between Db fields. Can anyone suggest any pointers as to how I might go about this with PHP?

Even before search / replace issues can PHP read an external file?

Thanks in advance for all advice,

Gary
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top