Bạn đang xem: Count the length of the string using the php strlen() function
Syntax:The syntax of the strlen() function is given below.
strlen(string $string): int
It takes a string value as the mandatory argument, & this function will return the length of the string value.
Xem thêm: 10+ Các Mẫu Cắm Hoa Hồng Đẹp, Hướng Dẫn Cách Cắm Hoa Hồng Đơn Giản
Create the PHP file with the following script where the strlen() function has been applied for the string data, number data, and Boolean data.
Output:
The following đầu ra will appear after executing the above script. In the output, the total number of characters returned for the string data, the total number of digits returned for the number data, & 1 returned for the true value.
I am a trainer of website programming courses. I like to write article or tutorial on various IT topics. I have a YouTube channel where many types of tutorials based on Ubuntu, Windows, Word, Excel, WordPress, Magento, Laravel etc. Are published: Tutorials4u Help.
Linux Hint LLC,