I have urls with strings in them that look like this:
search?q=FAIRMONT+FREE+STANDING+SPACE+SAVER+CABINET+IN+ESPRESSO++++++++++++++++++++++++++++++++++++++++++++++&
I've been trying to replace the extra plus symbols, but it's always a different number of them.
$ss = str_replace('+++++++', '+', $row[0]);
I assume I need to do a regex to match "any number of plus signs" here on the first parameter, but I'm not sure how to do that syntactically, or if that can still be done in str_replace?
Any help appreciated?
Edit -- this is not an "exact duplicate" as it was marked -- it asks a specific question about how to replace multiple characters in PHP. While one way to do this is regex using preg_replace, I assume there may be other methods as well. The question is not just about regex, considering there could be other solutions.