Basic PHP Programming Question:

Download Job Interview Questions and Answers PDF

How To Get the Number of Characters in a String?

PHP Interview Question
PHP Interview Question

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

Previous QuestionNext Question
How To Convert Strings to Numbers in PHP?How To Remove White Spaces from the Beginning and/or the End of a String in PHP?