Currently I have this code which replaces any double space with a .
It works as expected:
3条回答 臣服心动 (楼主) 2021-01-28 14:18 To get around the issues with str_replace (space in being replaced with |) try strtr: echo strtr(trim($result['garment_type']), array(' '=>'|', ' '=>'')); 0 讨论(0) 查看其它3个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复 热议问题
To get around the issues with str_replace (space in being replaced with |) try strtr:
str_replace
|
strtr
echo strtr(trim($result['garment_type']), array(' '=>'|', ' '=>''));