Explorar o código

add check_float function

luis daniel lucio quiroz %!s(int64=11) %!d(string=hai) anos
pai
achega
04e076cfbe
Modificáronse 1 ficheiros con 7 adicións e 0 borrados
  1. 7 0
      resources/functions.php

+ 7 - 0
resources/functions.php

@@ -30,6 +30,13 @@
 		}
 	}
 
+	if (!function_exists('check_float')) {
+		function check_float($string) {
+			$string = str_replace(",",".",$string);
+			return trim($string);
+		}
+	}
+
 	if (!function_exists('check_str')) {
 		function check_str($string) {
 			global $db_type;