I need to search a string and find the position of the first character found from a list. For example, something like this:
$string = "abcdef";
$pos = index($string,"b|e");
$pos should return "1" in this case because "b" comes before "e" in the string.
Is there a function that does this?
Thanks in advance!
$string = "abcdef";
$pos = index($string,"b|e");
$pos should return "1" in this case because "b" comes before "e" in the string.
Is there a function that does this?
Thanks in advance!