Guest User

Untitled

a guest
May 22nd, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. $a = array('w','x','y','z');
  2.  
  3. function iter($num,$arr,$max = 3){
  4. if( $num == 0 )return;
  5. $count = count($arr);
  6. $carr = $arr;
  7. array_splice($carr,$max,1);
  8. echo implode(",",$carr)."<br />";
  9. $max == $count - 1 ? $max = 0 : $max++;
  10. iter(--$num,$arr,$max);
  11. }
  12.  
  13. iter(10,$a);
Add Comment
Please, Sign In to add comment