check if strings contains certain word
$a = 'Hello world?';
if (strpos($a, 'Hello') !== false) { //PAY ATTENTION TO !==, not !=
echo 'true';
}
if (stripos($a, 'HELLO') !== false) { //Case insensitive
echo 'true';
}$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);
Also in PHP:
- after config:cache page stucture has broken in laravel
- codeigniter get last inserted data row
- date - Manual - PHPwww.php.net › manual › function.date.phpdate ( string $form
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223
- call seeder laravel
- Calculate the number of characters in the value php
- array_reverse in php
- Auth::user() id
- date month in php
- check if date is within range php
- echo date php format
- Cannot declare class Symfony\Component\Debug\ErrorHandler, because the name is already in use
- deprcation problem phpmyadmin ubuntu
- artisan make seeder
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:
- date php day of wekk
- cacert file_get_contents openssl
- calcolo iva php
- centos excecutable php
- drop down list display only seleted item only
- count duplicate strings array php
- DATE "W"
- check if a key exists in php array
- delete cache in laravel command