Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
PHP
how to check if PHP variable contains non-numbers?
Igor Skoldin
Programming language:
PHP
2021-05-22 15:34:52
0
Q:
how to check if PHP variable contains non-numbers?
rama9
Code:
PHP
2021-07-13 07:22:00
if ( is_numeric($_POST['foo']) ) { $foo = $_POST['foo']; } else { // Error }
0
Tags
number
php
variable
check
con
how
var
Related
php check if string contains number
how to check if a string contains a substring in php
php find if string contains
php is numeric
check if number is multiple of 3 in php
check if includes numbers php
php validate only numbers
php check if variable is array
php check if input is int
php is variable a number
check if any values are the same in an array php
php chech if string contains
php check if string contains
check if string is number or not php
php check if variable exists
php find if substring is in string
php check if string or number
check value contains numbers or letters php
php check if parameter exists
New to Communities?
Join the community