Jooel,
In looking over your snippet, I assume that I need to assign $array, to whatever my array is, and that $output is the array that now holds the indexes of the of smallest values.
_________________________
Today is the tomorrow you worried about yesterday.