strlen – Get string length

by admin on February 7, 2010

How Can count the length of String in php

int strlen ( string $string )
Returns the length of the given string

Example:
<?php
$string1='Hello';
$string2='Hello World";
echo strlen($string1); //5
echo strlen($string2); //11
?>

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>