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

前端 未结 2 642
被撕碎了的回忆
被撕碎了的回忆 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:47
    $column = str_replace("\xc2\xa0", '', $column);
    
    0 讨论(0)
  • 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

    0 讨论(0)
提交回复
热议问题