This is a PHP script I developed today. In fact, a few months ago I spent many weeks trying to make this script work but that was due to narrow mindedness. Today, going about it in a new way was successful.
The script was first developed in mind for a HTML selection box.
For example, there are ten options a user can select with the option of selecting more than one option in a HTML selection box. This required an index to be created so that when a specific combination was selected the PHP script had a database ID of the selection beforehand to use.
That said, some pretty neat things occurred today when it was all finished. The script produces unique combinations - therefore if the script has 123, it will not have 321 or 231 in the index, because the elements 1,2,3 are already present.
This is a unique combinations script that can produce combinations for any number of elements within reason. I have limited the online script to element totals between 1 and 10. But, I guess the real limits are the variable storage space.
The scary discovery mentioned is that unique combinations have special numbers;
Like input 4 into the script and the total combinations are 15.
Input 8 in the script and the total combinations are 255.
Obviously I have not processed the number 0, if it even is a number
I would appreciate some feedback since I feel I found a backbone as to how computers operate bitwise and even though I heard of 8 bit machines and upwards I never really made the connection to unique combinations. This script does!
Obrzut
