PHP function stristr()

Availability in PHP 4.0

Case-insensitive str

Parameters

Parameter Data type Default value Note
$haystack string not The string to search in
$needle mixed not
$before_needle bool null If true, stristr returns the part of the haystack before the first occurrence of the needle.

Return values

string

the matched substring. If needle is not found, returns false.

Additional resources

Official stristr documentation

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.