search

Home  >  Q&A  >  body text

What does this line of code mean?

if(!is_numeric($num1) || !is_numeric($num2)){

echo 'Please enter the numerical type';
}

迷路时你就往前走迷路时你就往前走1968 days ago1658

reply all(2)I'll reply

  • 王林

    王林2019-08-20 18:00:52

    is_numeric() function is used to detect whether a variable is a number or a numeric string.

    reply
    0
  • 丨胖₯㎕萌萌丶

    丨胖₯㎕萌萌丶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.

    reply
    0
  • Cancelreply