check if string has character php
$myString = 'Hello Bob how are you?';
if (strpos($myString, 'Bob') !== false) {
echo "My string contains Bob";
}// returns true if $needle is a substring of $haystack
function contains($haystack, $needle){
return strpos($haystack, $needle) !== false;
}$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}
Also in PHP:
- ata date format in php
- db seed particular table laravel
- check if string has character php
- Where are WordPress Pages and Posts Stored
- apt install php7.4-mbstring php7.4-zip php7.4-xml
- decode base 64 php
- filteredduplicata php
- create crandon string php
- ereg function in php
- date() php getting out
- error php display
- create new directory php
- Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 5.6.0".
- 'php' is not recognized as an internal or external command, operable program or batch file.
- check if string contain word
- Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: fileinfo
- @method overide form laravel
- clear cache laravel migrate
- array deduplicate in php
- catch error php
- What is a Regular Expression in php
- creating new project laravel
- autoload php multiple spl_autoload_register
- Target class [Barryvdh\Cors\HandleCors] does not exist.