PHP strpbrk Function

What is strpbrk Function?

Explanation

In PHP this function searches a string for any set of characters.

Syntax:


strpbrk(string,charlist)

In the above syntax "string", specifies the text to be searched for the character provided in "charlist".

Example :


<?php
echo strpbrk("Hi,how do you do!","ie");
?>
Result :

i, how do you do!

In the above strpbrk Function example the string is displayed from the first occurence of the character specified.

PHP Topics


Ask Questions

Ask Question