PHP Developer Question:

How to get number of characters in a String?

Tweet Share WhatsApp

Answer:

You can use the "strlen()" function to get 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

Download PHP Developer PDF Read All 57 PHP Developer Questions
Previous QuestionNext Question
How you can remove leading and trailing spaces from user input values in PHP?How you find a substring from a given string in PHP?