learningprobs Posted October 8, 2016 Share Posted October 8, 2016 Hello, I would like to output one by one all the values inside an array randomly but never output again the ones that have already been output until all the numbers in that array have been output. At the moment my array output numbers like this: Array ( [0] => Array ( [number1] => 1 [number2] => 4 ) [1] => Array ( [number1] => 1 [number2] => 3 ) [2] => Array ( [number1] => 1 [number2] => 2 ) ) So I would like the keys 0,1,2 to output randomly 1 time each and never have them to output again until all 3 keys have been output. In short, I will use the number1 and number2 separately and add "+" in between. I just want the system to show his additions as explained above so he learns them faster but not in order. Thanks in advance for your help. Quote Link to comment https://forums.phpfreaks.com/topic/302296-array-random-but-use-all-the-number-within-the-array/ Share on other sites More sharing options...
Jacques1 Posted October 8, 2016 Share Posted October 8, 2016 shuffle() Quote Link to comment https://forums.phpfreaks.com/topic/302296-array-random-but-use-all-the-number-within-the-array/#findComment-1538129 Share on other sites More sharing options...
learningprobs Posted October 9, 2016 Author Share Posted October 9, 2016 Thanks Jacques, strange I am not receiving notifications when I get replies. I clicked on "notify" when there is an answer. I am wondering if the forum system is down. Thanks for your help. Quote Link to comment https://forums.phpfreaks.com/topic/302296-array-random-but-use-all-the-number-within-the-array/#findComment-1538137 Share on other sites More sharing options...
requinix Posted October 9, 2016 Share Posted October 9, 2016 Are you getting a notification for this? Quote Link to comment https://forums.phpfreaks.com/topic/302296-array-random-but-use-all-the-number-within-the-array/#findComment-1538141 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.