When we want to know if a values is a number we should use is_numeric() function within a if statement. This function returns true is numeric or false if is not.
if (is_numeric(777)){
echo "is numeric";
}else{
echo "is not a number";
}
//returns "is a numeric"
if (is_numeric('hello')){
echo "is numeric";
}else{
echo "is not a number";
}
//returns "is not a number"