substr_count
(PHP 4, PHP 5)
substr_count — Telt het aantal substrings in een string
Beschrijving
int substr_count
( string $haystrack
, string $needle
)
substr_count() geeft het aantal keren dat de needle substring voorkomt in haystack .
Example#1 substr_count() voorbeeld
<?php
print substr_count("This is a test", "is";); // geeft 2
?>
Zie ook count_chars(), strpos(), substr() en strstr().