Code: Select all
$convert_array = array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","P","Q","R","S","T","U","V","W","X","Y","Z","1","2","3","4","5","6","7","8","9");
for ($i=0;$i<=1;$i++) {
for ($j=0;$j<=5;$j++) {
$before_array[] = rand (0, 33);
}
foreach ( $before_array as $x ) {
$y[$x] = $convert_array[$x];
echo "$y[$x]";
}
$coupon = implode(",",$y);
echo"<br /><b>$coupon</b><br /><br />";Is Implode working as it is suppose to? Is there a way to use implode and not have it do what it is here? Or is there a better way to go about doing this. I'm just generating 6 random numbers, converting those to numbers or letters (excluding 0 and O), and then merging them into 1 string so I can input it into SQL. Thank you for any and all help.
-Mike-