How to use FILTER VALIDATE FLOAT in PHP

This article describe about FILTER_VALIDATE_FLOAT filter in PHP.
  • 3516

FILTER_VALIDATE_FLOAT filter

For validate a value as a float number FILTER_VALIDATE_FLOAT Filter used.

  • Name: "float"
  • ID-number: 259

Example

<html>
<body>
<?php
$var=9.5;
var_dump(filter_var($var, FILTER_VALIDATE_FLOAT));
?>
</body>
</html>

Output

filtervalidatefloatphp.jpg

You may also want to read these related articles Click here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.