Currently I have this code which replaces any double space with a .
It works as expected:
3条回答 醉酒成梦 (楼主) 2021-01-28 13:57 You can pass arrays to str_replace $what[0] = ' '; $what[1] = ' '; $with[0] = ''; $with[1] = '|'; str_replace($what, $with, trim($result['garment_type'] ) ) 0 讨论(0) 查看其它3个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
You can pass arrays to str_replace
$what[0] = ' '; $what[1] = ' '; $with[0] = ''; $with[1] = '|'; str_replace($what, $with, trim($result['garment_type'] ) )