下面的代碼工作正常,但在第二個變量名 fixed_2 中為什么它顯示小數點后的 3 位數字?我嘗試了很多方法都沒有任何希望。$text = "000892021.2408000";$fixed_1 = preg_replace('/000/','',$text);$fixed_2 = preg_replace('/.000/','',$text);$fixed_3 = preg_replace('/000./','',$text);var_dump($fixed_1);var_dump($fixed_2);var_dump($fixed_3);輸出 string(11) "892021.2408" string(13) "000892021.240" string(13) "92021.2408000" 任何幫助請解釋?
- 2 回答
- 0 關注
- 158 瀏覽
添加回答
舉報
0/150
提交
取消