更新时间:2022-12-08 13:11:21
假设没有 CSV 引用问题:
Assuming there are no CSV quoting issues:
$newStr = str_replace( ',', '<br>', $string );
在看到您的回滚后,我发现您实际上想将 ,
替换为 newline
字符,例如 \r
, \n
或 \r\n
:
After seeing your rollback, i see that you actually want to replace the ,
with a newline
character such as \r
, \n
or \r\n
:
$newStr = str_replace( ',', "\n", $string );