I want to loop the below code until $grade=80, is the code below correct

<?php 


include "grade.php"; 

		$getgrade = new Grade(); // create an instance of the class(Grade)

	echo "<ul id='navigation'>";

	for($grade=0;$grade<80;$grade+10){

	$max = $grade+9; 
	
	echo "<li><a href='#'>$grade-$max%</a>
		<ul><li>";

		$getgrade->results($grade+9); 

		echo "</li></ul>
	</li>";
	
	}

	echo "</ul>";
		

 ?>

the page isn't loading when i try it so i'm guessing i got it wrong..

It should be $grade <= 80 but that is not the reason that the page doesn't work. Try putting this at the top of your page error_reporting(E_ALL);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.