【发布时间】:2023-12-12 08:37:01
【问题描述】:
$string = "my text has \"double quotes\" and 'single quotes'";
如何从$string 中删除所有类型的引号(不同语言)?
【问题讨论】:
-
$string 中没有引号你知道吗?
-
用 htmlentities 或 urlencoded 表示的引号呢?
-
您是在谈论自然语言引号(例如,„)还是编程语言引号(例如
/*...*/)? -
@Chris - 现在就做! :)
-
如果你只是从头到尾删除它们,那么
trim($str, "\"\'")