check if string has a specifdic word
$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:
- FORMATA DATA COM PHP
- Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". site:stackoverflow.com
- enable error php
- check if words are available in string in php
- check if array offset exists php
- encode image to base64 in php
- check array with name exists php
- character count php
- config clear laravel
- console.log for php
- fast laravel installation
- all error in pp
- STR_TO_Time('" . $purchaseDate . "', '%Y-%m-%d %H:%i:%s'), php
- echo console log php
- .htaccess php write error on windows
- check if word in string php
- console.php
- count on a string php
- Adding or Subtracting Time
- collection get first element laravel
- check if string contains only whitespace php
- $heure = date('H'); php 5
- access paginator object attribute in laravel
- cache clear in laravel by time