Browse Source

float check

master
Robin Thoni 9 years ago
parent
commit
819b77ae9a
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      utils.php

+ 5
- 0
utils.php View File

@@ -38,6 +38,11 @@ function get_get($key, $is_error = true)
38 38
   return get_param($_GET, $key, $is_error);
39 39
 }
40 40
 
41
+function check_float($f)
42
+{
43
+  return ($f == (string)(float)$f) ? $f : null;
44
+}
45
+
41 46
 function check_table_field($header, $table, $field)
42 47
 {
43 48
   $headers = apache_request_headers();

Loading…
Cancel
Save