PHP Developer Question:
Download Questions PDF

How to get number of characters in a String?

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 Interview Questions And Answers PDF

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?