开发者

PHP: How to replace quotes [closed]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜