.lenght en php string
/*
To measure the length of string there is built-in function in php which returns the exact length of string.
*/
Syntax:
strlen(paramenter);
<?php
$name = 'ankur';
echo "Name Length : ".strlen($name); // Name Length : 5
$message = 'Welcome greppers !';
echo "Message Length : ".strlen($message); // Message Length : 18
?>
/*
I hope it will help you.
Namaste
*/<?php
$name = 'abcdef';
echo strlen($str); // 6
$string = ' ab cd ';
echo strlen($str); // 7
?>
Also in PHP:
- What was the old name of PHP?
- array in array php foreach example
- check if table exists sql php
- create migration, controller, model and seeder laravel
- create folder with php
- current date to timestamp php
- clean function in php
- date time formatting php
- do console log in php code
- array filter php get first object
- android studio clear cache
- 5 examples of exception handling in php
- create seed file laravel
- dateFormat php
- check if lenghth of string is 11 in php
- echo errors of php
- Backend fatal error: PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted in laravel 8
- count string length php
- change string in capital usin gphp
- date month php
- create project in laravel 8 command
- Get the content of a specific page (by ID)
- check array item exists php
- all date format in php