Forum und email
substr_count

substr_count

(PHP 4, PHP 5)

substr_count -- Spočítat počet výskytů řetězce

Popis

int substr_count ( string haystack, string needle [, int offset [, int length]] )

substr_count() vrací počet výskytů řetězce needle v řetězci haystack string.

Příklad 1. Ukázka substr_count()

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