how to check inside of string in php code example
Example 1: how to check if a string contains a substring in php
$a = 'How are you?';
if (strpos($a, 'are') !== false) {
echo 'true';
}
Example 2: php string contains
$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);