check letters in string php code example
Example 1: php string contains
$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);
Example 2: check if string contains substring php 8
str_contains('STRING', 'SUB_STRING');
$mystring = 'abc';
$findme = 'a';
$pos = strpos($mystring, $findme);
str_contains('STRING', 'SUB_STRING');