$string = "$4.9/inch";
$res = filter_var($string, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
echo $res;
It will print4.9
Chandan Kumar
$string = "$4.9/inch";
$res = filter_var($string, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);
echo $res;
It will print4.9
Chat with our seniors to see if we have a good match
Chandan Kumar
Founder / Team Lead
Tags:
"*" indicates required fields
−
Chandan Kumar
Chandan Kumar
Chandan Kumar
Leave a Reply