![]() |
The mb_strlen() is an inbuilt PHP function that returns the string length in an integer. Syntax: mb_strlen($string, $encoding ): int Parameters: This function accepts 2 parameters that are described below:
Return Values: The number of characters in the string that have the character encoding, will be returned by this function. It will count as 1 for the multi-byte character. Example 1: The following program demonstrates the mb_strlen() function. PHP
Output: The length of the string is 5 Example 2: The following program demonstrates the mb_strlen() function. PHP
Output: The length of the string is 13 Reference: https://www.php.net/manual/en/function.mb-strlen.php |
Reffered: https://www.geeksforgeeks.org
PHP |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 15 |