ratcateme Posted June 28, 2008 Share Posted June 28, 2008 I am making a quiz with multi choice questions and i want the questions to change place so the answer will always be different at the moment i have a array with the questions and i want to randomize it. is there a function or easy way to do this?? Scott. Link to comment https://forums.phpfreaks.com/topic/112297-solved-randomize-array/ Share on other sites More sharing options...
MasterACE14 Posted June 28, 2008 Share Posted June 28, 2008 <?php echo rand(1,100); // will display a number between 1 and 100 ?> use that. Regards ACE Link to comment https://forums.phpfreaks.com/topic/112297-solved-randomize-array/#findComment-576542 Share on other sites More sharing options...
kenrbnsn Posted June 28, 2008 Share Posted June 28, 2008 use the shuffle() function. Ken Link to comment https://forums.phpfreaks.com/topic/112297-solved-randomize-array/#findComment-576544 Share on other sites More sharing options...
ratcateme Posted June 28, 2008 Author Share Posted June 28, 2008 thanks ken Link to comment https://forums.phpfreaks.com/topic/112297-solved-randomize-array/#findComment-576551 Share on other sites More sharing options...
MasterACE14 Posted June 28, 2008 Share Posted June 28, 2008 I'm gonna have to remember that function Link to comment https://forums.phpfreaks.com/topic/112297-solved-randomize-array/#findComment-576552 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.