code problem

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Daniyal
Forum Newbie
Posts: 14
Joined: Tue Jul 19, 2016 4:08 am

code problem

Post 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 ??????
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: code problem

Post by requinix »

They literally told you what code to write and where to put it.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: code problem

Post 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
(#10850)
Daniyal
Forum Newbie
Posts: 14
Joined: Tue Jul 19, 2016 4:08 am

Re: code problem

Post by Daniyal »

ya i have done.
thnx bro's :)
Post Reply