check length of a variable 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
$str = 'php';
echo strlen($str); // 3
$str = 's p a c e';
echo strlen($str); // 9
?>
Also in PHP:
- drupal 8 user_load
- array has not key in php
- $db new PDO php
- check if key present in array php
- convert string into non capital letters php
- create folder using library in php
- beautify var_dump
- $var.length in php
- can't see php7 in my mac
- SET CURRENT DATE TIME IN PHP'
- curl_setopt_array php
- bu7scador con laravel
- file_get_contents ssl accpet
- condition for both of one should be true laravel eloquent
- clear specific cache laravel 6
- check if result contains something php
- 404 page in laravel
- ERROR: Module mpm_event is enabled - cannot proceed due to conflicts. It needs to be disabled first! Considering conflict mpm_worker for mpm_prefork: ERROR: Could not enable dependency mpm_prefork for php7.2, aborting
- error exec() is disabled for the security reason laravel
- ethrow exception php
- check type of in php
- Artisan::call('db:seed', array('--class' => 'YourSeeder Class'));
- change readble date format in php
- Undefined index: gross_wt in C:\xampp\htdocs\aezaz\Dev\login\pdf_export\gb1.php on line 34