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 :: how to add two array in single array without repetation in php 
Php :: get page title wordpress 
Php :: show error php in htaccess 
Php :: get the string after a character in php 
Php :: all php error report 
Php :: laravel random query 
Php :: laravel .htaccess settings 
Php :: laravel route group middleware prefix 
Php :: php artisan php warning require 
Php :: php remove newline 
Php :: SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `users` add unique `users_email_unique`(`email`)) 
Php :: how uninstall the laravel 
Php :: string replace twig 
Php :: laravel carbon time format AM PM 
Php :: laravel request all except token 
Php :: laravel blade uppercase 
Php :: php code for getting the next day 
Php :: hit a simple url using curl in php 
Php :: function exists php 
Php :: laravel module create controller 
Php :: php remove last element array 
Php :: wordpress get archive title 
Php :: reset wp query 
Php :: button back php 
Php :: laravel seed specific file 
Php :: php curl verbose 
Php :: set charset of response php 
Php :: php request uri 
Php :: form post self php 
Php :: laravel make:listner 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =