yakoup46 Posted April 21, 2009 Share Posted April 21, 2009 So this is the code i have... $number = range('a','z'); $test = ($number[rand(0,25)]) . ($number[rand(0,25)]) . ($number[rand(0,25)]) . ($number[rand(0,25)]); So if were to echo $test i would get four random letters. What i want to do is have it continue to generate random letters until it creates the word 'food'. I have absolutely no idea where to go from here. So any help would be awesome. Link to comment https://forums.phpfreaks.com/topic/154977-generating-random-word/ Share on other sites More sharing options...
kenrbnsn Posted April 21, 2009 Share Posted April 21, 2009 Please don't double post. Locked. Ken Link to comment https://forums.phpfreaks.com/topic/154977-generating-random-word/#findComment-815203 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.