# Function for random number with no repeats?

**URL:** <https://forum.kirupa.com/t/function-for-random-number-with-no-repeats/233878>\
**Category:** Uncategorized\
**Created:** [July 27, 2007, 5:39pm UTC](https://forum.kirupa.com/t/function-for-random-number-with-no-repeats/233878 "2007-07-27T17:39:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pajhonka](https://avatars.discourse-cdn.com/v4/letter/p/ac8455/32.png) [@pajhonka](https://forum.kirupa.com/u/pajhonka)\
**Post date:** [July 27, 2007, 5:39pm UTC](https://forum.kirupa.com/t/function-for-random-number-with-no-repeats/233878/1 "2007-07-27T17:39:39Z")

</div>

Hello, I’d like to have a random number generator that, once it chooses a number, deletes it from the pool of possibilities (it’s for a photo gallery that shuffles images from an array)…either that or it keeps repeating the function until it gets a number that hasn’t been used.

Any help would be greatly appreciated! Thank you!
