PHP  
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  
<strncmpstrpos>
Last updated: Mon, 16 Jul 2012

strpbrk

(PHP 5)

strpbrk --  Search a string for any of a set of characters

Description

string strpbrk ( string haystack, string char_list )

strpbrk() searches the haystack string for a char_list, and returns a string starting from the character found (or FALSE if it is not found).

注: The char_list parameter is case sensitive.

例子 1. strpbrk() example

<?php

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

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

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




<strncmpstrpos>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST