Counting the Number of Characters in PHP

Q

How To Count the Number of Characters in a String?

✍: FYIcenter.com

A

You can use the "strlen()" function to count the number of characters in a string. Here is a PHP script example of strlen():

<?php 
print(strlen('It\'s Friday!'));
?>

This script will print:

12

 

PHP Built-in Functions for Strings

⇒⇒PHP Tutorials

2016-10-13, 218👍, 0💬