
April 12th, 2000, 11:00 PM
|
|
Junior Member
|
|
Join Date: Mar 2000
Location: Fitzgerald Ga USA
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Okay....situation is this:
I'm running an auction that has featured auctions, and as most other auction sites, I want to rotate 5 - 10 Featured on the front page. I can easily get an array of ALL featured auctions from the MySQL database. The question is this:
How do you write PHP code to choose only 5 of them, and not choose the same one twice? I'm using PHP3. I only have 8 featured auctions in my database right now, and the way I see it, if I can make this thing work with only 8, when I get 200+ featured in the database, it will work just as well.
I have searched for HOURS for random PHP scripts, but they only choose ONE random number, which is really easy...I need 5 different ones, with out duplicates.
Any help would be wonderful!
Regards,
Brant
Webnautics
|