# Random #'s with a twist

**URL:** <https://forum.kirupa.com/t/random-s-with-a-twist/92903>\
**Category:** Uncategorized\
**Created:** [October 23, 2003, 1:25am UTC](https://forum.kirupa.com/t/random-s-with-a-twist/92903 "2003-10-23T01:25:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![abzoid](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@abzoid](https://forum.kirupa.com/u/abzoid)\
**Post date:** [October 23, 2003, 1:25am UTC](https://forum.kirupa.com/t/random-s-with-a-twist/92903/1 "2003-10-23T01:25:38Z")

</div>

I’m venturing away from my ASP comfort zone to write what, on the surface, seems like a fairly simple script in PHP.

I have a small table that is a single row of 5 thumbnail images showing featured products. I want to select these five items at random from a specified list of items. Sounds easy enough, just generate five random numbers. BUT, how do I go about making sure that I have no duplicates?

Perplexed in Texas :puzzle:
