I have number ie 1,15,200
I want change to 115200
because when I divide it, it just divide 1 (before first comma)
eg : 1,15,200 / 100
output : 0.01
suppose to output : 1152
Don't put thousands-separators in the characters on the right of the decimal point. The groups of digits separated by the thousands separator must all be the same size (usually groups of three digits). It is OK if the first group has fewer digits.
Click File > Options. On the Advanced tab, under Editing options, clear the Use system separators check box. Type new separators in the Decimal separator and Thousands separator boxes. Tip: When you want to use the system separators again, select the Use system separators check box.
Great Britain and the United States are two of the few places in the world that use a period to indicate the decimal place. Many other countries use a comma instead. The decimal separator is also called the radix character.
Place the cursor at the location you want to insert the 1000 separator, click Insert > Symbol > More Symbols. 2. In the Symbol dialog, under Symbols tab select Verdana from Font drop-down list, then select Basic Latin from Subset drop-down list, now select the 1000 separator from the list, click Insert to insert it.
$num = (int)str_replace(',', '', $string);
// or
$num = (int)preg_replace('/[^\d]/', '', $string);
Try this way:
$num = filter_var('1,15,200', FILTER_SANITIZE_NUMBER_INT);
English notation without thousands separator
$english_format_number = number_format($number, 2, '.', '');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With