Basic PHP Programming Question:

How can I know that a variable is a number or not using a JavaScript?

PHP Interview Question
PHP Interview Question

Answer:

Answer 1:
bool is_numeric( mixed var)
Returns TRUE if var is a number or a numeric string, FALSE otherwise.

Answer 2:
Definition and Usage
The isNaN() function is used to check if a value is not a number.

Syntax
isNaN(number)

Parameter Description
number Required. The value to be tested


Previous QuestionNext Question
WHAT TYPES OF IMAGES THAT PHP SUPPORTS?How can we submit from without a submit button?