define string length in php
/*
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:
- db seeder laravel
- created_at default value laravel
- date month year format php
- check if word in php string match
- date('d') in php
- USA format date in php
- deactivate auto update wordpress plugins
- composer-php version check
- array unicode php
- add one day to date('l') php
- fetch today data in php
- - phpunit/phpunit 4.8.27 requires ext-dom * -> it is missing from your system. Install or enable PHP's dom extension.
- php remove spaces from string
- claer database connection cache laravel
- display errors in production
- check if word matches with string
- collection laravel filter
- array_unique spip
- composer require sprintcube/cakephp-rest
- codeigniter base_url
- filemtime($current_file_name);
- composer laravel istall
- associate laravel
- Builder::unique() laravel