Your First while loop


#1

        $loopCount = 2;
	while($loopcount < 9)
	{
	    echo "<p>Iteration number : [$loopcount]</p>";
	    $loopcount = $loopcount + 2;

can any one tell what's wrong it's always showing infinite symbol..like it's not loading


#2

If your code looks like the above, there should be a parse error owing to the missing closing brace on the while statement code body.

        $loopCount = 2;
	while($loopcount < 9)
	{
	    echo "<p>Iteration number : [$loopcount]</p>";
	    $loopcount = $loopcount + 2;
        }

#3

its not happening even with that last close bracket


#4

Check the spelling of your variable. PHP is case sensitive. Maintain the camelCase.


#5

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