我有一个包含双引号等特殊字符的字符串"或者逗号或者夸大其词
例如:
$str= "156- Police, 132 - Medical, 119 - Fire";
输出应该是
$newstr = "156 - Police, 132 - Medical, 119 - Fire"
我正在尝试使用php中的str_replace函数
$chars = array('"', "'", ",","-",".");
$speChars = array(""", "'", ",","-",".");
$newStr = str_replace($str, $chars, $speChars);
但它没有用。有谁可以帮我解决这个问题?