how to validate a string to be only numbers in php code example Example: php validate only numbers is_numeric($value); //returns true || false