php check whole number

how do I check to see if a number is a whole number and not a decimal?
jackjohnson44Asked:
Who is Participating?
 
JonathanMTConnect With a Mentor Commented:
or to check for input from a form etc. (where the var type will be a string) : http://uk2.php.net/manual/en/function.is-numeric.php#69366
0
 
JonathanMTCommented:
0
 
jackjohnson44Author Commented:
your first comment didn't work
I found the answer

            if(is_numeric($order_quantity))
                  {
                  if ( ((int)$order_quantity) != ((float)$order_quantity) )
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.