etrader Posted January 24, 2011 Share Posted January 24, 2011 How can I replace ' and " with str_replace? When I using the following code, I will get error. $string = str_replace(""", "something", $string); Quote Link to comment Share on other sites More sharing options...
dragon_sa Posted January 24, 2011 Share Posted January 24, 2011 $string = str_replace("\"", "something", $string); just need to escape it Quote Link to comment Share on other sites More sharing options...
etrader Posted January 24, 2011 Author Share Posted January 24, 2011 Sounds simple! Thanks for solving it! 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.