create crandon string php
function generateRandomString($length = 25) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charactersLength - 1)];
}
return $randomString;
}
//usage
$myRandomString = generateRandomString(5);
Also in PHP:
- eliminate duplicate values from associative array phph
- Your Composer dependencies require a PHP version ">= 7.2.5". You are running 7.2.0. in
- convert image to base64 php
- LARAVEL migrate error
- create symfony project
- Your PHP installation appears to be missing the MySQL extension which is required by WordPress.
- create table in wordpress plugin
- array with files content in a folder
- Laravel Mix npm run production error
- create array and remove duplicates php
- convert string to all caps php
- Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: fileinfo
- database seeder laravel 8.x
- encode string for csv
- find specific word in string php
- contains string php
- drupal 8 entity_view
- file form validation codeigniter
- blade comment
- codeigniter where order by
- fillable vs guarded laravel
- composer create project laravel 7
- Call to a function trim() on string laravel
- 10 min sleep php