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

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -