Query: mb_substr_count
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
MB_SUBSTR_COUNT(3) 1 MB_SUBSTR_COUNT(3) mb_substr_count - Count the number of substring occurrencesSYNOPSISint mb_substr_count (string $haystack, string $needle, [string $encoding = mb_internal_encoding()])DESCRIPTIONCounts the number of times the $needle substring occurs in the $haystack string.PARAMETERSo $haystack - The string being checked. o $needle - The string being found. o $encoding -The $encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used.RETURN VALUESThe number of times the $needle substring occurs in the $haystack string.EXAMPLESExample #1 mb_substr_count(3) example <?php echo mb_substr_count("This is a test", "is"); // prints out 2 ?>SEE ALSOmb_strpos(3), mb_substr(3), substr_count(3). PHP Documentation Group MB_SUBSTR_COUNT(3)