find string length php
<?php
$str = 'abcdef';
echo strlen($str); // 6
$str = ' ab cd ';
echo strlen($str); // 7
?>/*
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
*/
Also in PHP:
- alter seeder in laravel
- display error on screen
- Laravel Eloquent, group by month/year
- create a laravel project comand line
- date funciton
- corsair k70 rgb mk.2
- destrroy a session php
- ->format('j')
- Illuminate\Contracts\Container\BindingResolutionException Target class [SlugController] does not exist.
- clear cahce config laravel in cpanel
- To find out where your php.ini is located
- array shift php
- buscar texto dentro de php
- avoir la date php
- change from all caps to sentence case in php
- all the ways to address a page in php
- doubles tennis random function php
- add days with dates php
- chow to check which php version running wordpress
- branch from other branch
- disable timestamp laravel
- datetime format laravel
- PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Sp ecified key was too long; max key length is 1000 bytes")
- declare variable in view for loop laravel