PHP如何将单引号替换为双引号

'http://www.xo.cn/fy_65.html',
'http://www.xqo.cn/fy_64.html',
'http://www.xlo.cn/fy_63.html',
'http://www.xluo.cn/fy_62.html',
'http://www.x.cn/fy_61.html',
CURLOPT_POSTFIELDS => implode('\n', $urls),
在网上搜了一下 网上的是把所有的单引号都变双引号了
而我只想让CURLOPT_POSTFIELDS => implode('\n', $urls),
中的'\n'变为双引号 其他的不变 有什么办法吗

第1个回答  2018-03-16
直接编辑器替换,比如netbean就是 ctrl + H 然后 '\n' 替换成"\n"
假如你只想替换某种类型''而又不替换其他类型''就找到规律来
'http://www.xluo.cn/fy_62.html',
'http://www.x.cn/fy_61.html',
CURLOPT_POSTFIELDS => implode('\n', $urls),
CURLOPT_POSTFIELDS => implode('abc', $urls),
比如只替换下面两排的', 则: 先 ode(' 替换 成ode("
再',$url 替换成",$url 即可...本回答被提问者和网友采纳
相似回答
大家正在搜