check word in string and retun string
$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;
}
Also in PHP:
- 3 elements in do while loop php
- < Php echo date("m") . " "; ?> what is the output of this script?
- array_key_exists vs isset
- Igaster\Laravel Theme\Exceptions\theme Already Exists
- check if string has word php
- convert timestamp to readable date and time
- css adding corner
- dynamic carousel bootstrap php
- date time to date php
- array key contains php
- composer remove phpmailer
- create laravel project with composer
- doctrine mongodb native query
- find char in string php
- Example wp-config.php for Debugging
- check to see in string contains a specifc word php
- docker enable ext-dom php extension error
- config cache clear in laravel
- data php format
- Seeding: and no result laravel
- accepts a, b, c, date and prints below the results together with the current date php
- api header php
- buscar palabra en cadena php
- error reporting