HELP! PHP All on your own! ex: 7 STuck, why isn't this code working?


#1

 $num_of_roll = 6; 
				do {
    			$roll = rand(1,6);
    			if ($roll = 6) {
            $num_of_roll ++;
            echo "<p>We got 6!</p>";
          }
    			else {
        		 $num_of_roll ++;
            $roll = rand(1,6);
            echo "<p>Too bad, let's try again</p>";
          }
        }
          while ($roll !== 6); { 
          	$roll = rand(1,6); 
            $num_of_roll ++; 
          };
          $verb = "were";
          $last = "rolls";
    
          echo "<p>There {$verb}{$num_of_roll}{$last}!</p>";

#2

Do you still need help with this ?


#3

yes:grinning:

yesssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss


#4

I ran the code in the lesson it worked, Please paste in your latest code(all of it), lesson URL and error