PHP.nl

strpbrk

strpbrk

Search a string for any of a set of characters

 **strpbrk** string $string string $characters
searches the 

string for a . strpbrk``string``characters

string The string where is looked for. characters

charactersThis parameter is case sensitive.

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

Voorbeeld: example

<?php

$text = 'This is a Simple text.';

// this echoes "is is a Simple text." because 'i' is matched first
echo strpbrk($text, 'mi'), PHP_EOL;

// this echoes "Simple text." because chars are case sensitive
echo strpbrk($text, 'S'), PHP_EOL;
?>

strpos``strstr``preg_match