Showing posts with label print chess board in php. Show all posts
Showing posts with label print chess board in php. Show all posts

Saturday, 10 September 2016

HOW TO PRINT CHESS BOARD USING FOR LOOP IN PHP in easy method

HOW TO PRINT CHESS BOARD USING  FOR LOOP IN PHP





<body>



<table border="3" cellspacing="3" height="650" width="1350" align="center">

<?php


for($x=1; $x<=10; $x++){



for($y=1; $y<=10; $y++){

if(($x+$y)%2==0){
echo '<td bgcolor="#00000"></td>';
}
else{
echo '<td bgcolor="#FFFFFF"></td>';
}
}
echo '</tr>';


}

?>
</table>


</body>