arrays - remove list of specific characters from string php -
this question has answer here:
$string = "' ! ; • ,\ karsho: ; • ;}";
here want remove following characters,
$remove = array("'","!",";","•",",","\","}","{","[","]");
this input. want above array characters $string. want string like,
karsho:
you can use code
$string = "' ! ; • ,\ karsho: ; • ;}"; echo $new_str = str_replace(str_split('\\/!;•,}:*?"<>|'), ' ', $string);
Comments
Post a Comment