PHP strpbrk() Function

PHP strncmp() Function
PHP strpos() Function

what is the syntax of the STRPBRK() function in php?

strpbrk(string,charlist)
ParameterDescription
stringRequired. Specifies the string to search
charlistRequired. Specifies the characters to find
PHP STRPBRK() method

examples of the STRPBRK() function

Example 1. In this example, we 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");
?>

Example 2. 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");
?>
PHP strncmp() Function
PHP strpos() Function
en English
X
Scroll to Top