★ wanayoo — archive 1999 http://fr.php.net/manual/function.strstr.phpNouvelle recherche | Portail wanayoo

PHP Home Page

Manual Table of Contents
Up to Strings
Quick Reference
English version of this pageGerman version of this pageJapanese version of this page
Italian version of this pageFrench version of this pageHungarian version of this page
Spanish version of this pageDutch version of this pageBrazilian Portuguese version of this page
Korean version of this pageCzech version of this page
Strings
* AddCSlashes
* AddSlashes
* bin2hex
* Chop
* Chr
* chunk_split
* convert_cyr_string
* count_chars
* crc32
* crypt
* echo
* explode
* get_html_translation_table
* get_meta_tags
* hebrev
* hebrevc
* htmlentities
* htmlspecialchars
* implode
* join
* levenshtein
* ltrim
* md5
* Metaphone
* nl2br
* Ord
* parse_str
* print
* printf
* quoted_printable_decode
* quotemeta
* rtrim
* sscanf
* setlocale
* similar_text
* soundex
* sprintf
* strncasecmp
* strcasecmp
* strchr
* strcmp
* strcspn
* strip_tags
* stripcslashes
* stripslashes
* stristr
* strlen
* strnatcmp
* strnatcasecmp
* strncmp
* str_pad
* strpos
* strrchr
* str_repeat
* strrev
* strrpos
* strspn
* strstr
* strtok
* strtolower
* strtoupper
* str_replace
* strtr
* substr
* substr_count
* substr_replace
* trim
* ucfirst
* ucwords
* wordwrap

  Thanks to:
 Chek.com
 easyDNS
 VA Linux Systems

  Related sites:
Apache
MySQL
PostgreSQL
Zend Tech.

  Community:
LinuxFund.org
OSDN
Manual: strstr
View the source code for this pageSearch the site



Previous page
 strspn
 Updated
Mon, 08 Jan 2001
strtok 
Next page


strstr

(PHP 3, PHP 4 )

strstr -- Find first occurrence of a string

Description

string strstr (string haystack, string needle)

Returns all of haystack from the first occurrence of needle to the end.

If needle is not found, returns false.

If needle is not a string, it is converted to an integer and applied as the ordinal value of a character.

Note: Note that this function is case-sensitive. For case-insensitive searches, use stristr().

Example 1. Strstr() example


$email = 'sterling@designmultimedia.com';
$domain = strstr ($email, '@');
print $domain; // prints @designmultimedia.com
      

See also stristr(), strrchr(), substr(), and ereg().


 About Notes


Previous page
 strspn
 Updated
Mon, 08 Jan 2001
strtok 
Next page





Who's responsible for this?
Top of this page

Site
Hosting:



Located in
France
Elements of this website are subject to copyright.
Questions about installing or using PHP should be directed to one of the mailing lists.
Only questions about the website should be directed to webmaster@php.net.