/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function pc_array_power_set($array) { // initialize by adding the empty set foreach ($array as $element) foreach ($results as $combination) return $results; } $power_set = pc_array_power_set($set); $power_set contains eight arrays: