I dont know what is the problem with this code that gives me error. i mean I can see the result, but in codecadem when I click to run that i tgives error!


#1


<!DOCTYPE html>
<html>
    <head>
		<title>Your First PHP while loop!</title>
	</head>
	<body>
    <?php
	$loopCond = true;
	while ($loopCond ){
		//Echo your message that the loop is running below
		echo "<p> The loop is running.</p>";
		$loopCond = false;
	}
	echo "<p>And now it's done.</p>";
    ?>
    </body>
</html>


#2

It could be something as simple as added (unnecessary) white space inside the parameter list.

while ($loopCond)

#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.