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!


<!DOCTYPE html>
		<title>Your First PHP while loop!</title>
	$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>";


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

while ($loopCond)


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