I remember doing this before, but can’t find the code. I use str_replace to replace one character like this: str_replace(':', ' ', $string); but I want to replace all the following characters \/:*?"<>|, without doing a str_replace for each.
I remember doing this before, but can’t find the code. I use str_replace to
Share
str_replace()can take an array, so you could do:Alternatively you could use
preg_replace():