'ay', 'b' => 'bee', 'c' => 'see', 'd' => 'dee', 'e' => 'eee', 'f' => 'eff', 'g' => 'jee', 'h' => 'aych', 'i' => 'eye', 'j' => 'jay', 'k' => 'kay', 'l' => 'ell', 'm' => 'em', 'n' => 'en', 'o' => 'oh', 'p' => 'pea', 'q' => 'que', 'r' => 'are', 's' => 'ess', 't' => 'tee', 'u' => 'you', 'v' => 'vee', 'w' => 'double-u', 'x' => 'ecks', 'y' => 'why', 'z' => 'zee', '0' => 'zero', '1' => 'one', '2' => 'two', '3' => 'three', '4' => 'four', '5' => 'five', '6' => 'six', '7' => 'seven', '8' => 'eight', '9' => 'nine'); $alt_code = ""; for($i = 0; $i < 6; $i++) { if (!is_numeric($code{$i})) { if (ctype_upper($code{$i})) { $alt_code = $alt_code . "upper-" . $alt_char[strtolower($code{$i})] . " "; } else { $alt_code = $alt_code . "lower-" . $alt_char[$code{$i}] . " "; } } else { $alt_code = $alt_code . $alt_char[$code{$i}] . " "; } } return $alt_code; } function randomString($type='num',$length=6) { $randstr=''; srand((double)microtime()*1000000); $chars = array ( '1','2','3','4','5','6','7','8','9','0' ); if ($type == "alpha") { array_push ( $chars, 'A','B','C','D','E','F','G','H','I','J','K','L', 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z' ); } for ($rand = 0; $rand < $length; $rand++) { $random = rand(0, count($chars) -1); $randstr .= $chars[$random]; } return $randstr; } ?>