Cannot work out a php str_replace() to remove comma

前端 未结 1 944
抹茶落季
抹茶落季 2020-12-11 05:03

In a PHP project, I have:

$string = \"1,555\";

str_replace(\',\', \'\', $string);
echo $string; //is still 1,555

str_replace does not remo

相关标签:
1条回答
  • 2020-12-11 05:45
    $string = str_replace(',', '', $string);
    
    0 讨论(0)
提交回复
热议问题