Advertisement
Wesley221

Shuffle - get groupstage

Dec 8th, 2015
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.40 KB | None | 0 0
  1. <?php
  2.     $teams = array(
  3.         'Funny memers',
  4.         'Suicide Squad',
  5.         'One Miss Syndrome',
  6.         'Coke team',
  7.         'Green Tea',
  8.         '1 miss gods',
  9.         'diuleiloumou',
  10.         'U N D E R R A T E D G G',
  11.         'K.O.R.Y',
  12.         'Dr. Peppy',
  13.         'Me Sedap',
  14.         'Roerbakeiers',
  15.         'Spell Moon',
  16.         'Nervous Fruitdown',
  17.         'Multicultural Fruit Catchers',
  18.         'EsDawet',
  19.         'Brothers',
  20.         'Blood-Stained Apples',
  21.         'My Portuguese biches',
  22.         'Can\'t Catch The Beat',
  23.         'A Country Under the Sunlight',
  24.         'Eat my Nacho<3',
  25.         'Random Players',
  26.         'KiwiBeatZ'
  27.     );
  28.  
  29.     $iCounter = 1;
  30.     echo "<table><tr><td><h3>Not randomized teams: </h3>";
  31.     foreach($teams as $team)
  32.     {
  33.         if($iCounter <= 9)
  34.         {
  35.             echo '&nbsp;&nbsp;';
  36.         }
  37.         echo $iCounter . ": " . $team . "<br />";
  38.         $iCounter ++;
  39.     }
  40.  
  41.     echo "</td>";
  42.  
  43.     shuffle($teams);
  44.  
  45.     $iCounter = 1;
  46.     echo "<td style = 'padding-left: 50px;'><h3>Randomized teams: </h3>";
  47.     foreach($teams as $team)
  48.     {
  49.         if($iCounter == 5 || $iCounter == 9 || $iCounter == 13 || $iCounter == 17 || $iCounter == 21)
  50.         {
  51.             echo "<br/>";
  52.         }
  53.  
  54.         if($iCounter <= 9)
  55.         {
  56.             echo '&nbsp;&nbsp;';
  57.         }
  58.  
  59.         if($iCounter == 1 || $iCounter == 2 || $iCounter == 3 || $iCounter == 4)
  60.         {
  61.             echo "<span>" . $iCounter . ": " . $team . "<br /></span>";
  62.         }
  63.         else
  64.         {
  65.             echo $iCounter . ": " . $team . "<br />";
  66.         }
  67.  
  68.         $iCounter ++;
  69.     }
  70.  
  71.     echo "</td></tr></table>";
  72.  
  73.     echo "<br> Timestamp: " . date("d/m/Y G:i:s");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement