![]() |
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:
|
All times are GMT. The time now is 10:02 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|