Source Code:
(back to article)
<?php $value = "123"; // or any other value if (is_numeric($value)) { $result = $value + 10; echo "$value is a numeric value." . PHP_EOL; echo "Adding 10 to $value gives $result." . PHP_EOL; } else { $result = 0; echo "$value is not a numeric value." . PHP_EOL; echo "The result is $result." . PHP_EOL; }
Result:
Report an issue