Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2006
    Posts
    76

    Displaying the same thing only once

    I am writing a php script that takes 15 items out of an array randomly, but I want to make sure that the same one isn't chosen twice in the same instance of the script.
    A while back, I did something simular in perl, and I just made an array with numbers between 1 and 100, and then used these numbers as the array identifier, and after it was picked, I would just remove it from the array. I was planning to do the same thing with this PHP script, but a while back, I was browsing WHT and saw an easier way to do this, but now I can't find that thread.

    Does anyone know of an easier way to acomplish this than the way I listed above?

    Thanks in advance

  2. #2
    Join Date
    Dec 2006
    Posts
    76
    OK sorry about this post, I found something simular somewhere else, and I'll just adapt it to my needs.

  3. #3
    Join Date
    Nov 2005
    Location
    Palma de Mallorca, Spain
    Posts
    259
    Nice, can you share the solution you found so this thread has some value?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •