strstr

strstr

(PHP 4, PHP 5, PHP 7)

strstrFind the first occurrence of a string

Description

string strstr ( string $haystack , mixed $needle [, bool $before_needle = false ] )

Returns part of haystack string starting from and including the first occurrence of needle to the end of haystack.

Note:

This function is case-sensitive. For case-insensitive searches, use stristr()登录查看完整内容