Advertisement
GWibisono

kombinasi A-B untuk 2 slot

Jan 5th, 2014
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. $aChar=array("a","b");
  2. $digit=2;
  3.  
  4. for($i1=0;$i1<count($aChar);$i1++)
  5. {
  6.     $iPos=0;
  7.     $aShow=array();
  8.     $aShow[$iPos]=$aChar[$i1];
  9.     for($i2=0;$i2<count($aChar);$i2++)
  10.     {
  11.         $iPos++;
  12.         $aShow[$iPos]=$aChar[$i2];
  13.         cetak($aShow);
  14.     }
  15.    
  16. }
  17.  
  18. function cetak($ar,$s='')
  19. {
  20.    
  21.     foreach($ar as $v)$s.=$v;
  22.     echo $s."<br/>";
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement