[ create a new paste ] login | about

Link: http://codepad.org/T690Wdad    [ raw code | output | fork ]

PHP, pasted on Jan 12:
1
2
3
4
5
6
7
<?php

$quantity = '10a00.434';

$quantity = filter_var($quantity, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);

var_dump($quantity);


Output:
1
string(8) "1000.434"


Create a new paste based on this one


Comments: