Jump to content

[SOLVED] I dont seem to understand this...


The14thGOD

Recommended Posts

I'm trying to get this so that in a while loop, theres a variable that is added each time a row from the database is present and displayed it adds one too it. now i want it if it's divisible by 2 it will make a new row, here's the code I'm using, it works for if it's divisible by 4...so im kind of confused, if anyone could explain it a bit, that would be helpful:

 

<?php if (!(($x-1) % 2)) {
					echo("</tr>\n");
					echo("<tr>\n");
				}?>

 

Thanks,

 

Justin

Link to comment
https://forums.phpfreaks.com/topic/59566-solved-i-dont-seem-to-understand-this/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.