strncmp
<<<
strpbrk strpos
>>>

6.36 Chaînes de caractères (Strings)
6 Référence des fonctions
 Manuel PHP

Introduction
Pré-requis
Installation
Constantes pré-définies
Voir aussi
addcslashes
addslashes
bin2hex
chop
chr
chunk_split
convert_cyr_string
convert_uudecode
convert_uuencode
count_chars
crc32
crypt
echo
explode
fprintf
get_html_translation_table
hebrev
hebrevc
html_entity_decode
htmlentities
htmlspecialchars_decode
htmlspecialchars
implode
join
levenshtein
localeconv
ltrim
md5_file
md5
metaphone
money_format
nl_langinfo
nl2br
number_format
ord
parse_str
print
printf
quoted_printable_decode
quotemeta
rtrim
setlocale
sha1_file
sha1
similar_text
soundex
sprintf
sscanf
str_ireplace
str_pad
str_repeat
str_replace
str_rot13
str_shuffle
str_split
str_word_count
strcasecmp
strchr
strcmp
strcoll
strcspn
strip_tags
stripcslashes
stripos
stripslashes
stristr
strlen
strnatcasecmp
strnatcmp
strncasecmp
strncmp
->strpbrk
strpos
strrchr
strrev
strripos
strrpos
strspn
strstr
strtok
strtolower
strtoupper
strtr
substr_compare
substr_count
substr_replace
substr
trim
ucfirst
ucwords
vfprintf
vprintf
vsprintf
wordwrap

6.36.77 strpbrk() Recherche une chaîne de caractères dans un ensemble de caractères

[ Exemples avec strpbrk ]   PHP 5

string  strpbrk ( string   haystack , string   char_list )

strpbrk recherche la chaîne haystack dans l'ensemble de caractères char_list et retourne une chaîne commençant au caractère trouvé (ou FALSE s'il n'est pas trouvé).

Note

Le paramètre char_list est sensible à la casse.

Exemple avec strpbrk

<?php

$text
= 'Ceci est un texte Simple.';

// Ceci affichera "i est un texte simple." car 'i' correspond en premier
echo strpbrk($text, 'mi');

// Ceci affichera "Simple." car les caractères sont sensibles à la casse
echo strpbrk($text, 'S');
?>

<< strpbrk >>
strncmp Chaînes de caractères (Strings) strpos