check if a string contains a string php
$a = 'Hello world?';
if (strpos($a, 'Hello') !== false) { //PAY ATTENTION TO !==, not !=
echo 'true';
}
if (stripos($a, 'HELLO') !== false) { //Case insensitive
echo 'true';
}
Also in PHP:
- check if string contains word
- creating thumbnail in codeigniter
- date format in day name of month and year in php
- ci db query error
- SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was t oo long; max key length is 767 bytes
- all cap in php
- find char in string php
- clear firebase cacheweb hosting
- all uppercase php
- array value loop in php
- PHP REDIRECTION
- [ERROR] InvalidArgumentException: Wrong file in C:\xampp\htdocs\magento2.4\lib\internal\Magento\Framework\Image\Adapter\Gd2.php:64 Stack trace
- date('N') php
- $user = User::find($request->userid);
- error_reporting(E_all) Fatal error: Class 'library_session' not found in C:\xampp\htdocs\pcmart\include\config.php on line 15
- * in array key php
- disable cache laravel 8 development
- error_reporting(e_all) in php
- char to uppercase php
- capitalize all letters php
- file de redirection php
- class name laravel
- $date php
- Your Composer dependencies require a PHP version ">= 7.2.0".