if(!is_numeric($num1) || !is_numeric($num2)){
echo 'Please enter the numerical type';
}
王林2019-08-20 18:00:52
is_numeric() function is used to detect whether a variable is a number or a numeric string.
丨胖₯㎕萌萌丶2019-07-10 10:34:18
If either $num1 or $num2 is not a number or a numeric string, print a prompt message telling you that you need to enter a numeric type.