check a string contains a ltter in php
$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:
- count string php
- date time from timestamp php
- .length php
- clear cache laravel and composer
- date parameter in php
- arr::plunk laravel
- code php ajout heure
- check a string contains a ltter in php
- add a day in date function in php
- echo redirect set header
- $_SESSION php example
- char to uppercase php
- count remaining days php
- composer install laravel installer
- datetime print format php
- combine date time php
- determine the date format from a string php
- autoload.php
- clear catche laravel
- intval php
- Laravel validator::make() to validate image
- display picture in pdf generated with laravel
- date_create php format
- current+date+php