替换php字符串中的单引号为双引号的方法
更新时间:2017年02月16日 10:02:23 投稿:jingxian
下面小编就为大家带来一篇替换php字符串中的单引号为双引号的方法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧
实例如下:
$param = "{'id':'12', 'name':'hi'}"; $new = preg_replace('/\"/', '"', $param);
以上这篇替换php字符串中的单引号为双引号的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持脚本之家。
相关文章
How do I change MySQL timezone?
The MySQL timezone is set to MST (-7 hours GMT/UTC) and is not configurable by you. MySQL is only capable of having 1 timezone setting per mysql daemon. Therefore, you cannot select NOW() and expect a result in a timezone other than MST.2008-03-03
最新评论