How to check if a string contains any character in another string with PHP?
$a = "asd";
$b = "ds";
if (if_first_string_contains_any_of_the_chars_in_second_string($a, $b)) {
echo "Yep!";
}
So, in this case, it should echo since the ASD contains both D and S.
I want to do this without regular expressions .
super source
share