I am just learning php and am trying to randomize data in an array. I am creating a bingo card script that will allow teachers to create a bingo card from words that the enter in a form. What I would like to do is randomize the words that were entered in the form, that I placed into an array. $wbingo = array('$word','$word1','$word2','$word3','$word4', '$word5', '$word6', '$word7', '$word8'); PHP: That way I can randomize the words on the bingo board. In this case I have 9 words, I will also have a card with 25 words. Any ideas would be appreciated. Thanks
I think this does it? - good ol'google. $wbingo = array('$word','$word1','$word2','$word3','$word4', '$word5', '$word6', '$word7', '$word8'); shuffle($wbingo); PHP:
yes it will do the job. qdsouza if you are a newbie and would like to learn php i suggest you www.snippetcollection.com You can find interesting examples that you will learn from them. Updated daily!
Thanks for the link I bookmarked it. I bought Larry Ulman's "Php for the world wide web" and am taking online php courses through VTC canada. I like learning by doing new projects. I am learning but I'm trying to find a forum that well help support noobies. I'm not sure if this forum is just for experts.
I used the same code to randomize some links on the bottom of the pages of the sites in my sig. Works well.
www.snippetcollection.com is a forums for everyone. I mean everyone shares his snippets and everyone learn from others.