The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
||||
|
||||
Randomizing Numbers (the hard way)
Hi -- I'm trying to finish up a script that will pull user ids from a table and assign random ids from the same table to them -- like this:
1 -- 5 2 -- 3 3 -- 2 4 -- 1 5 -- 4 The trick is that a number can't be assigned to itself and it can't be assigned twice. Here is the code I have. It probably doesn't make sense to you, but hopefully you can figure out where I need to patch it up to make it randomize correctly. Right now it's not assigning numbers to themselves, but it is assigning numbers more than once. Thanks for any help you can give! PHP Code:
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|