Advertisement
carlos_neto

Onde estou errando?

Jul 20th, 2014
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. $var = array('Cruzeiro', 'São Paulo', 'Palmeiras', 'Santos', 'Inter', 'Corinthians');
  2.     $time = 0;
  3.    
  4.     while ($time < 5) {
  5.         $jg = rand(0,5);
  6.         $jg2 = rand(0,4);
  7.         $var2 = $var[$jg];
  8.         if($jg) {
  9.             $time = 5;
  10.             echo $var[5]." hexacampeão brasileiro \o/";
  11.         }
  12.         unset($var[5]);
  13.         else {
  14.             $time = $jg2;
  15.             echo "O ".$var[$jg2]." não conseguiu vencer dessa vez";
  16.         }
  17.    
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement