JonnySnip3r Posted August 15, 2010 Share Posted August 15, 2010 Hey guys does anyone know how i would go about generating a random word from an array? For example: $words = array("[apple]","[banana]","[kiwi]"); how would i have php choose one of these words and then spit it out? Thanks!!! Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted August 15, 2010 Share Posted August 15, 2010 Look at the shuffle function or the array_rand function. Ken Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.