php strpbrk() function


  Translation results:

英[strɪŋ] 美[strɪŋ]

n.String; rope, belt; thread, plant fiber; [Computer Science] String

vt. Winding, tuning; To line up in a line or a series; to tie, tie or hang with a thread; to extend or extend

Third person singular: strings Plural: strings Present participle: stringing Past tense: strung Past participle: strung


php strpbrk() functionsyntax

Function:Find any character in a group of characters in a string

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

Parameters:

ParametersDescription
haystack Find char_list in this string.
char_list This parameter is case-sensitive.

#Description: Returns a substring starting with the found character. If not found, returns FALSE.

php strpbrk() functionexample

<?php
$data = "hello php.cn";
echo strpbrk($data,"op");
?>

Run instance»

Click the "Run instance" button to view the online instance

Output:

o php.cn


<?php
$data = "Learning PHP in php.cn is a good choice";
echo strpbrk($data,"php");
?>

Run Instance»

Click the "Run Instance" button to view the online instance

Output:

php.cn is a good choice

Home

Videos

Q&A