create a lrandom string alphanumeric 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);<?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:
- check result statusCode amazon sms api
- create a new project in laravel
- database seeding in laravel
- downlad php
- SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No such host is known. (SQL: select * from information_schema.tables where table_schema = lara_c i_cd and table_name = migrations and table_type = 'BASE TABLE')
- PHP redireczt
- base64 decode
- disable php errors
- artisan delete cache
- create migration model and seeder laravel at once
- array key exists php dont return
- clear cache manually laravel 5.8
- codeigniter get last inserted id with where condition
- current date format in php
- dsiplay array on php
- clear all cahceh daat in laravel
- download laravel project
- : 1071 Specified key was too long; max key length is 767 bytes (SQL: alter tabl e `users` add unique `users_email_unique`(`email`))
- disab;e error reporting php
- clear cache in laravel in windows cmd
- assign php array into javascript
- exception return 0 php
- check if specific index of array exist php
- date( w ) php