I would like to randomly select one element from an array, but each element has a known probability of selection.
All chances together (within the array) sums to 1.<
If the array is small, I would give the array a length of, in this case, five and assign the values as appropriate:
array[ 0 => 0 1 => 0 2 => 0 3 => 0 4 => 1 ]