开发者

PHP: How to replace quotes [closed]

开发者 https://www.devze.com 2022-12-31 00:17 出处:网络
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.

This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic h开发者_开发百科ere, this one was resolved in a way less likely to help future readers.

Closed 7 years ago.

Improve this question

I am using this but it is not working:

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

Any help would be appreciated.


Try this:

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

OR

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


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


str_replace(array(" ' ", " \" ", " " "), " ", htmlspecialchars($variable ) );
0

精彩评论

暂无评论...
验证码 换一张
取 消