remove comma in numeric in php

Solutions on MaxInterview for remove comma in numeric in php by the best coders in the world

showing results for - "remove comma in numeric in php"
Gene
19 May 2017
1$var = 18,542.00;
2$var = intval(preg_replace('/[^\d.]/', '', $var));
3result :- 18542;
4or if you need float
5$var = floatval(preg_replace('/[^\d.]/', '', $var));
6result :- 18542.00;
7
queries leading to this page
how to remove comma from string array in phpremove comma string phpremove the comma from a number in phpremove comma number format phpphp remove commas from numeric stringsphp remove comma from numbersremove comma 27s phpremove comma from string phpremove comma in numeric in phpremove comma phpremove commas from a string in phphow to remove comma from a string in phpremove comma from number format in phpphp number format remove comma php remove comma and dollar sign from numberphp remove one comma from stringremove comma from a number in phpphp remove string after commaremove comma from a non numeric string phpphp function that remove comma separator on a numberhow to remove comma from text phpremove commas from number string phpphp remove commas in stringphp remove comma from stringphp remove comma from variableremove comma in php stringhow to remove comma in phpremove commas in array phphow to remove extra comma in phphow to remove comma from string in phpremove comma values from array phphow to remove comma in php dataremove comma from number phpnumber format remove comma phpremove comma from number in phpremove comma from end of string phpphp remove comma from end of stringhow to remove comma in phpphp remove comma from numberphp remove after commaphp remove comma from amountphp how to remove comma from stringremove commas in phpremove comma from a string phpphp string remove comma and afterremove digits after comma phpphp unformat number remove commaremove comma from a string phpremove comma from string in phphow to remove comma in number format in phpremove comma in string phpphp remove comma from string numberremove comma in phpphp remove comma from valuehow to remove comma from string phpremove string after comma in phpremove comma in number phpremove comma in number format phpphp decimal remove comma on thousandremove commas from number phpremove comma in numeric in php