check if includes numbers php
$var_num = "1";
$var_str = "Hello World";
var_dump( is_numeric($var_num), is_numeric($var_str) );
/*
Output -
bool(true)
bool(false)
*/if (preg_match('~[0-9]+~', $string)) {
echo 'string with numbers';
}
Also in PHP:
- eloquent run seeder
- add errors php
- Y-m-d H:i:s O format
- display_errors php.ini
- composer set php version
- array key exi
- echo php dropdown from db and save it in a db
- catching error php
- create seed file laravel
- check datatype of variable in php
- day of the week th usig php
- check if substring is present php
- clear cach php artisan
- download laravel 8.x
- check key exists in associative array in php
- Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\PPETrackerApp\email.php on line 21
- destrroy a session php
- clear array php
- create laravel project version 5.8
- date time function to php date
- array_unique
- To find out where your php.ini is located
- cahgne date format in php
- centos 7 install php composer