check if word exist in string
$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}$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:
- convert uppercase in php
- PHP text string contains character
- To find out where your php.ini is located
- change format date usa month text php
- create seed file laravel
- cronjob cakephp
- autoload file in laravel
- ->with('success'
- check if the string match in php
- create database backup programmatically php
- What was the old name of PHP?
- composer install in laravel project
- Impossible de trouver le paquet php-gettext
- disable errors in php
- HOW TO GET LAST INSERTED ID FROM TABLE IN SQL IN CODEIGNITER
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 40 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
- check if contains ph
- associative array in one key in value must unique in array check in php
- array in array php foreach
- check if string in string php
- execution time exentd php
- "$_HEADER" php
- codeigniter get num_rows
- expire Cache Manually laravel