programming-examples/php/String/PHP script to remove comma(s) from the following numeric string.php
2019-11-15 12:59:38 +01:00

8 lines
114 B
PHP

<?php
$str1 = "2,543.12";
$x = str_replace( ',', '', $str1);
if( is_numeric($x))
{
echo $x."\n";
}
?>