|
|
The is_numeric() function is an inbuilt function in PHP which is used to check whether a variable passed in function as a parameter is a number or a numeric string or not. The function returns a boolean value. Syntax: bool is_numeric ( $var ) |
Follow the example.
<?php
$num = 12;
if (is_numeric($num)) {
echo $num . " is numeric";
}
else {
echo $num . " is not numeric";
}
?>
Category: | Web Tutorial |
Sub Category: | PHP String Tutorial |
Uploaded by: | Admin |
Read Articlehttps://develop.horje.com/learn/1434/reference