Advertisement
Wesley221

Shuffle - get 4 wildcards

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