HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

strpbrk

Description

The strpbrk of String for PHP search a string for any of a set of characters.

Syntax

strpbrk ( string $haystack , string $char_list ) : string

Parameters

haystack

The string where char_list is looked for.

char_list

This parameter is case sensitive.

Return

Returns a string starting from the character found, or FALSE if it is not found.

Examples

1

<?

$haystack = "CASEcase";
$char_list = "s";

$return = strpbrk($haystack, $char_list);

echo $return;
se

2

<?

$haystack = "Hello World!";
$char_list = "do";

$return = strpbrk($haystack, $char_list);

echo $return;
o World!