PX : code

AAA PHP - Alphabet Array by Jason Lotito
Download this code


<?php

/*
# AlphaArray
# By Jason Lotito
# Vowels are 22-26, thereby allowing random numbers
# for random name creation to differentiate between
# vowels and consonants

Note: This is just the base array.  You might just want
to require this into whatever documents you will use this 
in, as it will be easier.  A simple way to use this file
would be as follows:

<?
require "/alphaarray.arr";
$ltr1 = $a[(rand(1,21))];
$ltr2 = $a[(rand(22,26))];
$ltr3 = $a[(rand(1,21))];
$ltr4 = $a[(rand(1,21))];
$ltr5 = $a[(rand(22,26))];
$ltr6 = $a[(rand(1,21))];
$name = (strtoupper($ltr1))."$ltr2$ltr3$ltr4$ltr5$ltr6";
echo "$name";
?>

This would create a random name of 6 characters, the first character
is capitalized.  Not that $ltr2 and $ltr5 both call the vowels.

*/

#Consonants 1-21
$a[1] = "b";
$a[2] = "c";
$a[3] = "d";
$a[4] = "f";
$a[5] = "g";
$a[6] = "h";
$a[7] = "j";
$a[8] = "k";
$a[9] = "l";
$a[10] = "m";
$a[11] = "n";
$a[12] = "p";
$a[13] = "q";
$a[14] = "r";
$a[15] = "s";
$a[16] = "t";
$a[17] = "v";
$a[18] = "w";
$a[19] = "x";
$a[20] = "y";
$a[21] = "z";

#Vowels 22-26
$a[22] = "a";
$a[23] = "e";
$a[24] = "i";
$a[25] = "o";
$a[26] = "u";

?>

Comments or questions?
PX is running PHP 5.2.17
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.