# Random 'for loop'

**URL:** <https://forum.kirupa.com/t/random-for-loop/229118>\
**Category:** Uncategorized\
**Created:** [June 14, 2007, 8:04am UTC](https://forum.kirupa.com/t/random-for-loop/229118 "2007-06-14T08:04:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iwiniquit](https://avatars.discourse-cdn.com/v4/letter/i/7993a0/32.png) [@iwiniquit](https://forum.kirupa.com/u/iwiniquit)\
**Post date:** [June 14, 2007, 8:04am UTC](https://forum.kirupa.com/t/random-for-loop/229118/1 "2007-06-14T08:04:23Z")

</div>

is there a way to make a random ‘for loop’ like:

for (m = 0; m \< max\_entries; m++) {

i’m pulling stuff from an xml file and would like the loop to display all the entries, but in a random order rather than 0, 1, 2, 3.

if i used the random math function i’m not sure how to tell the loop which entries have been displayed and which have not.

any ideas/help would be greatly appreciated!
