Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP: How to replace quotes [closed]

Tags:

php

I am using this but it is not working:

$replaced = str_replace(''', '"', $text);

Any help would be appreciated.


1 Answers

Try this:

$replaced = str_replace('\'', '"', $text);

OR

$replaced = str_replace("'", '"', $text);

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!