There is another great command in PHP similar called STRLEN. The command counts the number of characters in a string. In our previous example, we were using a string called $post with a Lorem Ipsum content.
$post="Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat." $count=strlen($post); echo $count; |
The result is a character count of: 276.