check if a string contains a word php
$myString = 'Hello Bob how are you?';
if (strpos($myString, 'Bob') !== false) {
echo "My string contains Bob";
}$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}
Also in PHP:
- check if strcontains
- executar comando linux php
- adding header function to href php
- composer install larave
- echo command in browser console
- array unique values php
- codeigniter remote queries very slow
- display current date in php
- STR_TO_Time('" . $purchaseDate . "', '%Y-%m-%d %H:%i:%s'), php
- adding 2 in date() php
- How to reload a page using php
- comment acceder à la base de données phpmyadmin sur mac ave
- PHP Warning: require(/Applications/Ampps/www/SalesSystem/vendor/composer/../symfony/polyfill-php80/bootstrap.php): failed to open stream: No such file or directory in /Applications/Ampps/www/SalesSystem/vendor/composer/autoload_real.php on line 66
- exception get short message php
- No match for argument: phpmyadmin yum
- create project command in laravel
- covert string to all uppercase in php
- SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes laravel
- cancel stripe subscription php
- date with time in php
- blade Keep input values after failed validation
- PHP redireczt
- convert timestamp to date time in php
- delete uploaded file php