Basic PHP Programming Question:

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



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?