Page 1 of 1

code problem

Posted: Thu Jul 28, 2016 5:19 am
by Daniyal
anyone plz tell me what i do with this code ???
here are the instructions (below)

. On line 9, add a condition inside the parentheses ( ) that makes the while loop run as long as $loopCond == true
. Inside the curly braces, use echo to output "<p>The loop is running.</p>"
. Then click Save & Submit Code to run your first PHP while loop!
these are the instructions for code?
and here the code in which we implement these instructions (below)

Code: Select all

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

plzz tell what should i do ??????

Re: code problem

Posted: Thu Jul 28, 2016 5:51 am
by requinix
They literally told you what code to write and where to put it.

Re: code problem

Posted: Thu Jul 28, 2016 12:04 pm
by Christopher
Start with the first instruction. It says to add a logical expression.
Daniyal wrote: . On line 9, add a condition inside the parentheses ( ) that makes the while loop run as long as $loopCond == true

Code: Select all

Line 9:	while (){
See the manual for the while() statment: http://php.net/manual/en/control-structures.while.php

Re: code problem

Posted: Thu Jul 28, 2016 1:32 pm
by Daniyal
ya i have done.
thnx bro's :)