let's say I have an object:
$person->name = array('James',
'Sam',
'Kevin',
'Mike');
$person->weight = array(1,
3,
1,
7);
In the above example James has a weight of 1, Sam has a weight of 3, etc. (based on index location)
I want to be able to echo only one person's name. The higher the weight, the greater the chance of your name being selected. The lower the weight, the lower your chance is for your name to be selected. Sort of like a lottery, but with weights. Any idea on how to do this?