try to type cast to int php code example Example: php typecast to int $num = "3.14"; $int = (int)$num; $float = (float)$num;