RE: [PHP] Looking for help with a complex algorithm

From: Date: Wed, 10 Oct 2007 15:14:28 +0000
Subject: RE: [PHP] Looking for help with a complex algorithm
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-263044@lists.php.net to get a copy of this message
[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.

« previous php.general (#263044) next »