check if string contains 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';
}$result = strpos("haystack", "needle");
if ($result != false)
{
// text found
}
Also in PHP:
- destrroy a session php
- after validate credential header is not redirect to another page in php in live server
- check datatype in php
- $_Server php
- AWS HTTP error: SSL operation failed with code 1.
- .net base64 encode decode in php
- alert in php
- currunt date time in php
- date_format() in php
- $loop variable laravel
- display current data php
- ata date format in php
- List all folder in pHP
- console.log. php print
- disable register on laravel
- check composer version php
- echo all php errpr
- 4 letters of the months of the year php
- date php W_z
- array key exist
- convert to timestamp php
- apt install php 7.4
- Eloquent Query Scope on Relationships
- convert unix timestamp to timestamp php