Your Open Source

 
Related Links
PHP  >>  String

String

Strlen Function in PHP

strlen() function is used to get the length of a given string.

Syntax is strlen(string).

The string parameter is, of course, required.


<?php echo strlen("Very Simple!"); ?>  

123456789...


Output:12

Here's another example:

<?php $str = 'Too easy';

echo strlen($str); // 8

$str = ' e a s y ';
echo strlen($str); // 9
?>

  • hits 65
  • datetime Aug 02 09 05:42:56
  • author Lazywriter
  • rating

Rating : 12345

Comments

No Reply..

Quick Reply or Comments

Preview
Your Name:
Your Reply :
<> is a code tag
Enter the verification code: