Search a string for the characters "oe", and return the rest of the string from where it found the first occurrence of the specified characters:
<?php
echo strpbrk("Hello world!","oe");
?>
Try it Yourself »
The strpbrk() function searches a string for any of the specified characters.
Note: This function is case-sensitive.
This function returns the rest of the string from where it found the first occurrence of a specified character, otherwise it returns FALSE.
strpbrk(
string,charlist)
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
charlist | Required. Specifies the characters to find |
Return Value: | Returns the string starting from the character found, otherwise it returns FALSE |
---|---|
PHP Version: | 5+ |
This function is case-sensitive ("W" and "w" will not output the same):
<?php
echo strpbrk("Hello world!","W");
echo "<br>";
echo strpbrk("Hello world!","w");
?>
Try it Yourself »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!