PHP create a random string over 99 char long
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);el.addEventListener('contextmenu', function(ev) {
ev.preventDefault();
alert('success!');
return false;
}, false);
Also in PHP:
- create project laravel 6
- clear cache on laravel
- count the no of characters in a string in phph
- Eloquent ORM means
- DateTime TO UNIx timestamp PHP
- 3 letter month abbreviations in php date format
- drupal 8 user_load
- display_errors in php.ini
- echo json php
- Target class [Controller] does not exist.
- create folder using library in php
- Allowed memory size of 56623104 bytes exhausted (tried to allocate 12288 bytes) wordpress
- Composer detected issues in your platform: laravel
- doctrine fixture bundle
- Date(y, m, 0)
- Difference between echo and print statement in php
- add header image to woocomerce shop page
- drupal 7 db_query example
- Auth::getUser();
- add <tr> after 4 <td> using php
- ALTER table migrations
- clear view laravel
- Laravel catch TokenMismatchException
- find element in arrat php