character length in php
<?php
$str = 'php';
echo strlen($str); // 3
$str = 's p a c e';
echo strlen($str); // 9
?>/*
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:
- addition in php
- drop down list display only seleted item only
- console.log on php
- find duplicate in array php
- 16 digit random password generator php code
- In Connection.php line 1262: Class 'PDO' not found
- 4random numbers php
- check if front page wordpress
- date php day of wekk
- add google analytics to website laravel
- blog post page is_home
- contain in string php
- base64 decode encode php
- check string length in php
- aptitude install php7.4
- dropzone uploader php
- android studio clear cache
- $s = [1,2,3] for loop use in php
- do not include time stamp laravel
- determine the date format from a string php
- ajax php form submit
- check if the string match in php
- WooCommerce Add Long Description to Products on Shop Page with Character limit
- custom factory in laravel 8