Search
 
SCRIPT & CODE EXAMPLE
 

PHP

check if includes numbers php

if (preg_match('~[0-9]+~', $string)) {
    echo 'string with numbers';
}
Comment

php check if string contains number

if (preg_match('/[A-Za-z]/', $myString) && preg_match('/[0-9]/', $myString))
{
    echo 'Contains at least one letter and one number';
}
Comment

PREVIOUS NEXT
Code Example
Php :: laravel 8 selecet the 2nd to the last record 
Php :: php déclarer une constante URL 
Php :: artisan refresh 
Php :: php read json request body 
Php :: concat in laravel 8 
Php :: access storage from the view laravel 6 
Php :: Composer detected issues in your platform: Your Composer dependencies require a PHP version "= 8.0.2". 
Php :: laravel relationship with for single data 
Php :: php loop backwards through array 
Php :: php if post exists 
Php :: laravel check collection has key 
Php :: HTML Snippets not working in .php files 
Php :: make model -mcr laravel 
Php :: pdo turn on errors 
Php :: add column in table laravel 
Php :: php put print_r into variable 
Php :: php check if url parameter exists 
Php :: laravel send ajax 
Php :: Laravel Session using Global Session php function 
Php :: Add 7 days to the current date in PHP 
Php :: guzzle post request with data 
Php :: php string replace regex 
Php :: pdo get row count 
Php :: running laravel project in mobile phone 
Php :: replace all numbers in string php 
Php :: php get array key by value multidimensional 
Php :: send email php smtp hostinger 
Php :: laravel if database has table 
Php :: php array length 
Php :: php check version ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =