View Single Post
Old 05-21-2011, 12:46 PM   #51
thevaliantx
Minors (Triple A)
 
thevaliantx's Avatar
 
Join Date: Mar 2011
Posts: 292
Layton, in the case of those who want randomly selected logos for say, 'pirates', would you the first instance of each letter (ie, pirates being in the 'p' section of the list) do this?

if first letter of word is 'p' then create array
for each following word that starts with 'p' add to array
if following word does not start with 'p' then
get length of array
range of random numbers starts from 0 to (length of array - 1)
random 'pirate' logo is equal to array 'pirate' [random number]

or something like that. It has been a LONG time since I took a programming course.
thevaliantx is offline   Reply With Quote