[snip] If the OP wants any single valid set, then this seems to work. If he wants all valid sets, no joy. I added a 10.00 and a 0.22 to the $values array and varied the position of the 10.00 (before and after 3.76) and it seems to pull the first set where the first member in the $values array is a member of the set. For a second there, I thought it pulled the set where the largest possible member in the $values array is also in the set. Maybe it meets the needs of the OP? [/snip] Any valid single set is good, once found that data is marked and is not in the search set any longer. So if I perform a second search for the same amount it will give me the next set if it exists. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php