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

java - HTTP Status 500 - An exception occurred processing JSP page /second.jsp at line 15 -

SQL Server - MyCTE query based on 24 hour period (next day) -

php - Using str_replace to translate a MySQL Table in html -