$quantity = filter_input(INPUT_GET, 'quantity', FILTER_SANITIZE_NUMBER_FLOAT);
Input: 100.25
100.25
Output: 10025
10025
How can I preserve the . character?
.
Try this...
$quantity = filter_input( INPUT_GET, 'quantity', FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION );
CodePad.
1.4m articles
1.4m replys
5 comments
57.0k users