How to remove all occurrences of c2a0 in a string with PHP?

前端 未结 2 644
被撕碎了的回忆
被撕碎了的回忆 2021-02-02 13:08

I\'m working with a CSV file which is exported from Excel.

I have a column that contains a value of 1 234,00. I need to get all whitespaces away from these kinds of colu

2条回答
  •  野的像风
    2021-02-02 13:51

    You may use trim

    trim($data['value'], " \t\n\r\0\x0B\xc2\xa0")
    

    Where \t\n\r\0\x0B is defualt mask, \xc2\xa0 need add

提交回复
热议问题