How to find the length of a string in PHP?

Last updated 4 years, 7 months ago | 1088 views 75     5

Tags:- PHP

PHP | Length of a string

There is a string function called strlen() which is used to find the length of a string. It accepts a string that returns the length of the given string. 


Let's see an example:


echo strlen("Hello world!");


// output
This will produce following result −