7/7 - PHP -This worked but I still got an error message


#1

7/7 - This passed but I still got an error message. I don't think it does what I intended. Advice anyone?

<!DOCTYPE html>
<html>
    <head>
		<title>Your own do-while</title>
        <link type='text/css' rel='stylesheet' href='style.css'/>
	</head>
	<body>
    <?php
		$loopCond = 0;
		do {
			$loopCond = rand(1,6);
			$loopCond ++;
			echo "<p>The dice are rolling</p>";
		}
	while ($loopCond ($loopcond !=6)); 
			echo "<p>Six!</p>";
    ?>
    </body>
</html>

#2

You've almost got it, just a little wonky on your while condition and no need to increment $loopCond.

<?php

echo "The die is rolling ";

// roll the dice
do {
    $dice = rand(1,6);
    echo ". ";
} while ($dice != 6);

// winner!
echo "<br>Got a 6!";
?>

#3

This is what I did
I Think It may work for you