Answers for "remove comma from string php"

PHP
2

php remove null bytes from string

$text = str_replace("\0", "", $text);
Posted by: Guest on January-29-2021
0

remove comma in numeric in php

$var = 18,542.00;
$var = intval(preg_replace('/[^\d.]/', '', $var));
result :- 18542;
or if you need float
$var = floatval(preg_replace('/[^\d.]/', '', $var));
result :- 18542.00;
Posted by: Guest on April-09-2021
5

php remove last character from string

$hell = substr('hello', 0, -1);
Posted by: Guest on November-04-2019
0

remove string after comma in php

preg_replace('/^([^,]*).*$/', '$1', $print);
substr($string, 0, strrpos($string.",", ","));
Posted by: Guest on March-18-2021

Code answers related to "remove comma from string php"

Browse Popular Code Answers by Language