PHP Strlen

See also PHP strings and the strpos() function.

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

This function will also count spaces between words as a character.

Strlen Syntax

The proper syntax to use for the strlen function is:

strlen(what to search);

For example:


echo strlen("This is my string.");

This bit of code would display:

18