Jump to content

using escape sequence


otuatail

Recommended Posts

Hi. I have a database table with one field having a string comment field.

 

I need to replace the '£'£ with &pound but I have tried this

 

$Comment = $row['Comment'];

$Comment = str_replace( $Comment, "£","£");

 

This just replaces the $Comment with a single character '£'

 

If the string says "I have a £ in my pocket" it should be replaced with

"I have a &pound in my pocket"

 

TIA

Link to comment
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.