Odd or Even


Posted on 16th Feb 2014 07:03 pm by admin

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.

Code:
<?
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?

No comments posted yet

Your Answer:

Login to answer
152 Like 29 Dislike
Previous forums Next forums
Other forums

Creating XML with php
I need to creat an XML with php and have successfully produced a valid output.
The problem I hav

How to make a mail Form secure?
I want to create an email Form on my web site. How can I make the Form secure so the submitted info

Word filter problem
Hello,

im trying to make a filter for words inputted in to my website but i want to store the

How do I use ValidatorCallout extender in Login control?
Hi,I'd like to customize the look and feel of the login control a little bit. One thing I'd love to

chat
hello i'm amir i need a chat source code in asp.net 2.0 without Ajax. anybody can help me?

Using cURL to PUT
Can somebody help with the correct php code to make a cURL PUT request. Here is a sample of code bel

PHP Display Telephone Number On Referrer
I have used the php below to show a different telephone number in the header of the site depending u

Require select-option functionality in Module Pool Programming
Hi Gurus,

I am doing a development by Module Pool on Warehouse Management. For that devel

TinyMCE / Ajax Postback Problem
Hiya all,

I have a page which loads the TinyMCE editor. On the postback I obviously want to f

Give me all your tricks for minimizing jar file size

Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier w

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash