In this tutorial, we are going to learn about how to get the length of a given string in PHP.
To get the length of a string, we can use the built-in
strlen() function in PHP.
strlen()function takes the string as an argument and returns the total number of characters in it.
Here is an example, that gets the length of a
$name = "lincoln"; $length = strlen($name); echo $length;