Name

strstr

Synopsis

string strstr(string string, string character[, bool before])

Returns the portion of string from the first occurrence of character until the end of string, or from the first occurrence of character until the beginning of string if before is specified and true. If character is not found, the function returns false. If character contains more than one character, only the first is used.

Get Programming PHP, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.