[ create a new paste ] login | about

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

PHP, pasted on May 20:
1
2
3
4
5
6
7
<?php

$quantity = '10a00.434';

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

echo $quantity;


Output:
1
1000.434


Create a new paste based on this one


Comments: