Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $a = array('w','x','y','z');
- function iter($num,$arr,$max = 3){
- if( $num == 0 )return;
- $count = count($arr);
- $carr = $arr;
- array_splice($carr,$max,1);
- echo implode(",",$carr)."<br />";
- $max == $count - 1 ? $max = 0 : $max++;
- iter(--$num,$arr,$max);
- }
- iter(10,$a);
Add Comment
Please, Sign In to add comment