check if a text contains a string
$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:
- artisan composer install
- divi layout injector shortcode module in function php file
- @return throw exception php
- event click right mouse
- fetch data from live website curl php
- blade php code
- find index of a charachter charachrer isn string phph
- date format function in php
- find curren monday in laravel carbon
- check if array key matches php
- exceptional handling in php
- find a file in php
- check if string contains word
- compress video file size php
- create only migration table in laravel
- failed to open stream: no such file or directory php
- find in string php
- convert uppercase to capitalize in php
- Getting Screen Resolution PHP
- date formate function in php
- Add “Affected Products” in catalog price rule
- check text in string php
- create new project in laravel
- array kley exists php