strlen() | How To Get String Length in PHP?

Date Published: 20/03/2020 Published By: JaiSchool

strlen() function is used to count the length of a string in PHP.

You have to pass the variable name in which you have stored the string in strlen() method's parameter or string in a double quote in strlen().


$data = "";
$length = strlen($data);
echo $length;


Publish A Comment

Leave a Reply

Your email address will not be published. Required fields are marked *