Table of Contents

strlen

WMPRO, WMMINI FW >= 1.0 WMMEGA FW >= 2.0

Return the length of a string

Description

int strlen ( string $input )

Parameter

$input: A string

Return Values

Integer number of bytes in the string (it's length), which can be 0 if the input string is empty

Examples

<?
  $str='abcdef';
  echo strlen($str); // 6
 
  $str=' ab cd ';
  echo strlen($str); // 7
?>

See Also

charat() - Return the ASCII code for a character in a string at an index

strpos() - Return the position of the first occurrence of a needle in a haystack

strrpos() - Return the position of the last occurrence of a needle in a haystack

strtolower() - Return the lowercase version of a string

strtoupper() - Return the UPPERCASE version of a string

substr() - Return part of a string

ucfirst() - Convert a string to lowercase except for the first character