Do you know how can we check the value of a given variable is a number?



Do you know how can we check the value of a given variable is a number?..

Answer / Chandra Vijay Singh

In PHP, you can use the `is_numeric()` function to check if a given variable is a number. For example: `if (is_numeric($variable)) { // the variable contains a number }`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

what is the use of include() function when include_once() alone will enough?

1 Answers  


How can we submit a form without using submit buttons?

1 Answers  


What is abstract class in php?

1 Answers  


Steps for the payment gateway processing?

1 Answers  


How does php isset work?

1 Answers  


How can we know the number of days between two given dates using PHP?

8 Answers   AZTEC, HCL, Navsoft,


What is difference between get and post in php?

1 Answers  


what is the diffrence between for and foreach?

11 Answers   Hirolasoft, IBM, Photon,


Echo is used to Display message on screen. Which is used with echo to not output the trailing newline?

1 Answers  


Tell me how can we check the value of a given variable is alphanumeric?

1 Answers  


What is $_ request in php?

1 Answers  


What is exception in php?

4 Answers  


Categories