strpbrk()
Similar to strstr(), this function searches a string, finds the first occurrence of a character, and returns the string starting from that character.
The main difference in this function is that it takes a list of characters and stops when it finds any one of them. It is also case sensitive. Returns false if none of the characters are found.
$str = "The quick brown fox jumped over the lazy dog."; $new = strpbrk($str, 'bfqz'); // quick brown fox jumped over the lazy dog. $new = strpbrk($str, 'tr'); // rown fox jumped over the lazy dog. $new = strpbrk($str, 'Tr'); // The quick brown fox jumped over the lazy dog. $new = strpbrk($str, '7'); // false
See the manual entry for strpbrk()
