Thread: Random Text
View Single Post
Old 05-07-2008, 11:56 AM   #5 (permalink)
Orc
The Prestige
 
Orc's Avatar
 
Join Date: Dec 2007
Posts: 1,044
Thanks: 193
Orc is on a distinguished road
Default

Quote:
Originally Posted by sketchMedia View Post
on the face of it it may sem complex but its actually quite simple (que pseudo(ish)code)

make an array of words
count how many words we have
loop over and make a random number
check the number to see if it already is in the random number array
if not continue, but if it does exist loop until a random number is produced that is unique

then loop over again but use the random number from the random number array as an index for the word array and echo it

make sense?
yeah yeah, just i havent felt well for the past few days, and well i cant think right, and plus my pc is being slow. too much memroy usage i ugess.

but cant you just use array_unqiue for making them unique words aswell?
__________________
VillageIdiot can have my babbies ;d
Orc is offline  
Reply With Quote