I'm stuck on While Loops PHP. Can someone please help


#1

Hello! I am stuck on PHP Tutorial While Loops. Can someone please help me. I could use all the help that I could get. My name is Michael and I have been on this particular exercise for several weeks now. I need to get all the help that I can. Can someone give me an example of using while loops in PHP? I have tried three examples and the lesson doesn't recognize them. Please someone needs to help. Thanks!

Michael T.


Replace this line with your code.


#2

can you please post your code here so we can help you better?
also include the link that goes to the lesson.


#3

It is not the code I am having trouble with. It is writing the While loop. The computer isn't recognizing my code that I'm putting in. Can you please give me an example of a While loop in PHP? I am looking at Google for examples, but the examples I'm seeing aren't being recognized by the lesson. Any suggestions would be useful or helpful. Thanks.


#4

<?php

	$loopCond = false;

	do {

		echo "<p>The loop ran even though the loop condition is false.</p>";
	}

	while($loopCond);

	echo "<p>Now the loop is done running.</p>";
	
?>

#5

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