Created
January 10, 2020 12:44
-
-
Save egin10/06db0d1b34bf1f602e19abcd6b8a18fb to your computer and use it in GitHub Desktop.
Random Example Transaction Code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$arr = []; | |
for($i = 0; $i < 10; $i++) { | |
$num_rand = num_rand(); | |
if(!in_array($num_rand, $arr)) { | |
$arr[] = $num_rand; | |
}else{ | |
$num_rand = num_rand(); | |
$arr[] = $num_rand; | |
} | |
} | |
function num_rand() { | |
$num_rand = rand(); | |
$str_num_rand = substr((string)$num_rand,0,6)."MC"; | |
return $str_num_rand; | |
} | |
print_r($arr); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment