September 2001
Intermediate to advanced
768 pages
32h 45m
English
string strstr(string string, mixed substring)
Returns all of string after the first occurrence of substring.
Returns:
String; FALSE if the substring doesn’t exist in the string
Description:
strstr() returns all of string after the first occurrence of substring . If substring doesn’t exist in string , the function returns FALSE.
Version:
PHP 3+, PHP 4+
See also:
Other functions that find characters within strings:
strchr() stristr() strpos() strrpos() substr()
Example:
<?php $quote = "A man cannot be comfortable without his own approval. --Mark Twain"; $separator = '--'; if ($remainer = strstr ($quote, $separator)) { echo 'The author for this quote was likely '", substr ($remainer, ... |
Read now
Unlock full access