How to replace in PHP all matches of a digit plus a space with comma in a string

前端 未结 0 1303
梦谈多话
梦谈多话 2020-12-21 06:51

$str = "Hello 1234567 Stack 56789 Overflow 12345";

$str = preg_replace(\'/([0-9] )/\', \',\', $str);

I want this "Hello 1234567, Stack 56789, Ov

相关标签:
回答
  • 消灭零回复
提交回复
热议问题