How can I replace all commas followed by spaces (\", \") with just commas (\",\")?
\", \"
\",\"
I don\'t want to replace spaces when they don\'t have a
This should do the trick:
$str = "some, comma, seperated, words"; $str = str_replace(", ", ",", $str);