check substring php
$myString = 'Hello Bob how are you?';
if (strpos($myString, 'Bob') !== false) {
echo "My string contains Bob";
}$result = strpos("haystack", "needle");
if ($result != false)
{
// text found
}// returns true if $needle is a substring of $haystack
function contains($haystack, $needle){
return strpos($haystack, $needle) !== false;
}
Also in PHP:
- create new seeder laravel
- Laravel DB Cache
- composer get version from php
- check length of a string in php
- find a string in another one phph
- cannot use font awesome in php mvc
- delay in php
- 6 digit alphanumeric random code generator php
- .lenght en php string
- base encode64 php
- disable admin bar wordpress
- access config variable in codeigniter controller
- USA format date in php
- base url in php
- convert string to int php 7
- Chace Clear of Larvel
- date reformat php
- alert js in php
- check if index of array exists php
- csv to json php
- convert dd/mm/yyyy to yyyy-mm-dd in mysql php
- corsair k70 rgb mk.2
- actual date php
- default header value in php