$string = "' ! ; • ,\ KarSho: ; • ;}";
在这里,我想删除以下字符,
$remove = array("'","!",";","•",",","\","}","{","[","]");
这也是输入。我想要来自 $ string 的数组字符。最后我想要字符串,
KarSho:
答案 0 :(得分:0)
使用以下代码:
$remove = array("'","!",";","•",",","\\","}","{","[","]"," ");
$replace = array("","","","","","","","","","","");
$string = "' ! ; • ,\ KarSho: ; • ;}";
echo str_replace($remove,$replace,$string);
您需要在\
中再添加一个\答案 1 :(得分:0)
您可以使用此代码
j