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

 

Ways to Remove Leading and Trailing White Spaces in PHP

PHP Built-in Functions for Strings

PHP Built-in Functions for Strings

⇑⇑ PHP Tutorials

2016-10-13, 1978🔥, 0💬