otuatail Posted February 25, 2018 Share Posted February 25, 2018 Hi. I have a database table with one field having a string comment field. I need to replace the '£'£ with £ 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 £ in my pocket" TIA Quote Link to comment Share on other sites More sharing options...
requinix Posted February 25, 2018 Share Posted February 25, 2018 When in doubt, read the documentation. 1 Quote Link to comment Share on other sites More sharing options...
phpmillion Posted February 26, 2018 Share Posted February 26, 2018 You are doing it almost right, and the only issue is the mixed order of arguments in your code. I'm sure you will solve it in 5 seconds after taking a quick look at the documentation. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.