substr_count

(PHP 4 >= 4.0.0)

substr_count -- Telt het aantal substrings in een string

Omschrijving

int substr_count (string haystrack, string needle)

substr_count() geeft het aantal keren dat de needle substring voorkomt in haystack.

Voorbeeld 1. substr_count() voorbeeld


print substr_count("This is a test", "is"); // geeft 2