check is string contains some words 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:
- fetch data from phpmyadmin
- composer laravel install
- check if string contains a string php
- date as php
- You want to develop a Laravel application on your Windows machine. For this, you installed the Laravel framework on your system. In which of the following scenarios, Laravel will not run on your system?
- array unique in laravel
- add days to current date php
- check if string include char php
- create seede for table in laravel
- create project laravel 6 using composer
- date now in php
- composer command to install laravel
- download php artisan
- check if result contains something php
- array size php
- date format php sql
- "$_HEADER" php
- Extract images from a folder in php
- Customizing The Validation Attributes
- changing a part of a string into uppercase php
- fgets php
- exact time in php
- Woocommerce Display field value on the admin order edit page [Custom Field Display 2]
- exception handling php'