1. Use the str_replace function to remove commas from numbers. Replace some characters in a string with other characters (case sensitive).
echo str_replace(",","","10,000,000,000.00");
Output:
10000000000.00
2. Remove commas from numbers through the number_format function. Format numbers by thousands grouping.
Note: This function supports one, two, or four arguments (not three).
echo number_format(1235.369,2,'.','');
Output:
1235.37
The above is how to remove commas from PHP numbers. I hope it will be helpful to everyone. More PHP learning guide: source code network