Måske noget ala det her
- function array_possibilities() {
- $result = array();
- $args = func_get_args();
- if(empty($args)){
- return array(array());
- }
- $arr = array_shift($args);
- $cufa = call_user_func_array(__FUNCTION__, $args);
- foreach($arr as $a){
- foreach($cufa as $p){
- $result[] = array_merge(array($a), $p);
- }
- }
- return $result;
- }
-
- $possibilities = array_possibilities(
- array('Divine', 'Keeper', 'Lani', 'ux1q'),
- array('Zixem', 'Cheatson', 'Ponywizard', 'Drake'),
- array('Hardcode', 'Zhen', 'Elusive', 'Saken'),
- array('aush0k', 'ryanc', 'reiko', 'penisman'),
- array('hycca', 'osama', 'stalin', 'castro')
- );
-
- foreach($possibilities as $p)
- {
- echo implode(" ", $p)."<br/>";
- }