Let's take a look at how to determine whether a number contains & quot ;. & quot; This post was last edited by abu_sec from 2013-05-1417: 00: 42. I want to make a program to determine whether it is an integer, because no matter whether it is a negative number or a positive number, it only needs to include & nbsp ;. they are not integers. please take a look at how to determine whether a number contains "."
This post was last edited by abu_sec at 17:00:42
I want to develop a program to determine whether it is an integer.
Because no matter whether it is a negative number or a positive number, it is not an integer as long as it carries. // you can get a code.
Share:
------ Solution --------------------
Echo (gettype ($ num) = "integer ")? "Integer": "not an integer ";
------ Solution --------------------
If (preg_match ('/^ [-+]? \ D + $/') echo 'integers ';
------ Solution --------------------
$ A = 50;
Return $ a ==( $ a <0 );