How to use string length function in php


We will show you complete detailed example for getting string length in PHP. We will give you proper example which will explain you and then you can copy that code and you can easily test it in the local php file . This example will be simple and easy to understand as a user friendly language.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>String Length Example in PHP</title>
//This is the Simple example with the string variable you can get the string length
$name = "John Corner";
echo strlen($name);
//The Result will be 11 which will show you the length of the string