瀏覽代碼

add check_float function

luis daniel lucio quiroz 11 年之前
父節點
當前提交
04e076cfbe
共有 1 個文件被更改,包括 7 次插入0 次删除
  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;