Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/*
Generar cadena aleatoria en PHP con str_shuffle
@author parzibyte
*/
$caracteres = '123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-.#!';
for($x = 0; $x < 10; $x++){
$aleatoria = substr(str_shuffle($caracteres), 0, 10);
echo $aleatoria . "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment