Código: Selecionar todos
<?php
// obtém o tamanho da string e
// imprime a string na tela
$length = strlen("david");
print $length;
?>
Código: Selecionar todos
<!DOCTYPE html>
<html>
<head>
<title>strlen() - PHP</title>
</head>
<body>
<?php
$num = strlen("Anderson");
echo $num;
?>
</body>
</html>
Demo: http://codepad.org/jyRCBVLm