Jump to content

[SOLVED] Odd or Even


phpretard

Recommended Posts

Inside of a while loop I need to echo several rows of info...easy enough.

 

In the loop (for the sake off css) I need to distinguish between odd and even row numbers.

 


<?
connect();

$documentQ=mysql_query("select * from docs");   
while($doc=mysql_fetch_assoc($documentQ))
  {
   echo" 
   <li class=\"oddrow\"><a href="docs/notes/PrincipalsNotes_0911.doc\">November</a></li>
   <li><a href=\"docs/notes/PrincipalsNotes_0910.doc\">October</a></li>
   <li class=\"oddrow\"><a href=\"docs/notes/PrincipalsNotes_0909.doc\">September</a></li>
   ";
  }

free($documentQ);

?>  

 

 

Male sence?

 

Any thoughts?

 

 

Link to comment
https://forums.phpfreaks.com/topic/180957-solved-odd-or-even/
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.