php check whole number

how do I check to see if a number is a whole number and not a decimal?
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) :
jackjohnson44Author Commented:
your first comment didn't work
I found the answer

                  if ( ((int)$order_quantity) != ((float)$order_quantity) )
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.