Why is my code not running correctly :(


#1








<?php
//write your do-while loop below
$rollcount = 0;
do {
$roll = rand(1,6);
$rollcount ++;
if($roll=6){
echo "congratz";
else {
echo "keep rolling";
}
} while ($roll);

?>
</body>


#2

Please post your code in This format. We cant see your code..


#3

<?php 
	//$rollcount = 0;
	do { 
		$roll = rand(1,6);
		//$rollcount ++;
		if($roll == 6){
			echo "congratz";
		else {
			echo "keep rolling";
		}
	} while ($roll != 6);
?>

Now it should work. Didn't tested it tough.