如何用单引号替换双引号
如何使用 PHP 将 ""
(我认为它称为双引号)替换为 ''
(我认为它称为单引号)?
How can I replace ""
(I think it's called double quotes) with ''
(I think its called single quotes) using PHP?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(8)
或重新分配它
or Re-assign it
使用
Use
尝试使用 preg_replace,
Try with preg_replace,
您可以使用str_replace,尝试使用 http://php.net/manual/ en/function.str-replace.php 它包含 php 文档的分配。
You can use str_replace, try to use http://php.net/manual/en/function.str-replace.php it contains allot of php documentation.
尝试使用 strtr,
Try with strtr,
对于 PHP 5.3.7
或
PHP 5.2
For PHP 5.3.7
OR
For PHP 5.2
试试这个
Try this
我喜欢使用中间变量:
另外,您应该有一个 Test.php 文件,您可以在其中尝试一些东西:
z
I like to use an intermediate variable:
Also, you should have a Test.php file where you can try stuff out:
z