check string contain php
$myString = 'Hello Bob how are you?';
if (strpos($myString, 'Bob') !== false) {
echo "My string contains Bob";
}$a = 'Hello world?';
if (strpos($a, 'Hello') !== false) { //PAY ATTENTION TO !==, not !=
echo 'true';
}
if (stripos($a, 'HELLO') !== false) { //Case insensitive
echo 'true';
}$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}
Also in PHP:
- clear cach php artisan
- display al errros php
- composer php version command
- browser cache laravel
- add one day in php
- check if key exists with value in array
- create folder using library in php
- check string php
- all files in a folder to array php
- echo err in php
- diplay php error
- css date function
- destrroy a session php
- clear database cache laravel command
- date phhp
- Laravel users_email_unique
- check array has key php
- cmd download file
- Tto upper php
- Backend fatal error: PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted in laravel 8
- composer global require laravel/
- Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.2.33.
- difference entre deux date php
- enable the cache mechanisms laravel