auto generate 6 string
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);<?php
// online code for creating alphanumeric in php
// this will generate 6 charactor, you can create as many just change the 6 from code
$pass = substr(str_shuffle("0123456789abcdefghijklmnopqrstvwxyz"), 0, 6);
echo $pass;
//output : 17w2y8
?>
Also in PHP:
- call seeders database seeder laravel
- check if key array exist php
- check if string contains only whitespace php
- base64 encode in javascript and decode in php
- array exists key php
- PHP found in
- The key "initial" is not recognized and ignored.
- composer check current php version
- alias migratedb='php artisan migrate'
- Assume that a database connection is established using a PDO object named $db
- acf show the taxonomy image
- curl_init() in php
- +1 day to date in php
- downlad php
- check already string to string in php
- date formte php
- How to fix undefined index: name in PackageManifest.php line 131 error with Composer
- Your Composer dependencies require the following PHP extensions to be installed: fileinfo
- clear all cahceh daat in laravel
- Decode from Base64 format php
- adding spasifc date to date('Y-m-d H:i:s') php
- date mont php
- base64_decode image string php
- catch error in php