php tutorial - PHP strlen Function - php programming - learn php - php code - php script
- The string length function is used to count the number of character in a string.
- For example, if you put any Spaces in between characters means that will also be counted.
php script Syntax :
strlen(string);
click below button to copy the code. php tutorial - team
php 7 Sample Code : sample php program
<!DOCTYPE html>
<html>
<body>
<?php
echo strlen('WIKITECHY');
?>
</body>
</html>
click below button to copy the code. php tutorial - team
php programmer Code Explanation :

- echo strlen('WIKITECHY'); In this string function we are counting the number of character’s length in the term ‘WIKITECHY’.
php coding Sample Output :

- Output shows the term “wikitechy” which has nine characters so the value of string length “9” as shown in the output window.