rockinaway Posted January 12, 2011 Share Posted January 12, 2011 If I have an array, $array, how can I loop through it (e.g. with a foreach() ) .. but just do it randomly? So each time, random entries of the array are used and not necessarily in order. Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted January 12, 2011 Share Posted January 12, 2011 You could shuffle it before looping through it. Quote Link to comment Share on other sites More sharing options...
rockinaway Posted January 12, 2011 Author Share Posted January 12, 2011 Yup, just found it. thanks 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.