mb_substr_count(3) php man page | unix.com

Man Page: mb_substr_count

Operating Environment: php

Section: 3

MB_SUBSTR_COUNT(3)							 1							MB_SUBSTR_COUNT(3)

mb_substr_count - Count the number of substring occurrences

SYNOPSIS
int mb_substr_count (string $haystack, string $needle, [string $encoding = mb_internal_encoding()])
DESCRIPTION
Counts the number of times the $needle substring occurs in the $haystack string.
PARAMETERS
o $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 VALUES
The number of times the $needle substring occurs in the $haystack string.
EXAMPLES
Example #1 mb_substr_count(3) example <?php echo mb_substr_count("This is a test", "is"); // prints out 2 ?>
SEE ALSO
mb_strpos(3), mb_substr(3), substr_count(3). PHP Documentation Group MB_SUBSTR_COUNT(3)
Related Man Pages
mb_strrichr(3) - php
mb_strstr(3) - php
mb_strrpos(3) - php
iconv_strpos(3) - php
mb_stripos(3) - php
Similar Topics in the Unix Linux Community
UNIX.COM 2017 Year End Summary
New Code Tags (Syntax Highlighting)
Status of UNIX.COM Forum Transformation
Please Welcome Ravinder Singh to the Moderation Team
The Order of the Wizard's Hat - Lifetime Achievement Award 2019 - Congrats to Don Cragun