Posted by Chung Leong on 12/04/05 18:31
The hash table was invented precisely to solve this sort of problem. Example: $first=range("a","z"); $second=range("a","z"); $third=range("a","z"); $all_hash=array(); foreach ($first as $f){ foreach ($second as $s){ foreach ($third as $t){ $all_hash[$f.$s.$t] = true; } } } $all_arr = array_keys($all_hash);
[Back to original message]
Copyright © 2005-2006 Powered by Custom PHP Programming