• PHP Video Tutorials

PHP - Function Strlen



Syntax

int strlen ( string $string )

Definition and Usage

It is used get string length..

Return Values

It returns length of a string on success or else string is an empty

Parameters

Sr.No Parameters & Description
1

string

It specifies string to finds the length

Example

Try out the following example

<?php
   $input = 'sairam';
   
   echo strlen($input);
?>

This will produce following result −

6
php_function_reference.htm
Advertisements