QUestion about checking a list for value's occurence.

Discussion in 'PHP' started by exaro, Jan 19, 2006.

  1. #1
    I am making a type of a referral system. I have people input information. It shows up on a list. Only top 10 recent to sign up show up. I need a little if(); function to check to see if one of my variables is already in the top 10 of the list, to prevent people from flooding the top 10. Very simple.

    It should only take a little if(); or while(); but I'm not sure exactly what it would be.

    Any suggestions would be appreciated.

    Thanks.
     
    exaro, Jan 19, 2006 IP
  2. Triexa

    Triexa Active Member

    Messages:
    580
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #2
    Well you can have the top 10 in an array, then you get their submission...

    then you in_array() to see if their submission occurs in the array (the top 10)
     
    Triexa, Jan 20, 2006 IP