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.

Did you know?Explore Trending and Topic pages for more stories like this.
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

Mastering Regular Expressions, Third Edition, is available.
The Third Edition of Mastering Regular Expressions is available.

QuoteThis third edition is 5

sapgui f4 help last search
I know this has to be simople. One user (maybe more) does not have the "last search saved" from the

Month String to Numeric?
Hi guys,

Given a month as a string, is there a simple way to find the numeric representation

Problem with HTML form
Hello,

I made a HTML form with some fields and check box.
Everything works fine except whe

What's wrong with my code
sobbing for many days, still don't know why please Help. Why my page isn't posted correctly. In a

Registration
ok so i have a site where people can register and login which works now thanks to someone on here th

progress bar...need expert opinion of experienced webmaster
Hey guys, quick question:

I want to display a progress bar when I upload files, but I am not

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

How can use this array as a key?
Say I have this array for example:


print_r($array);

Prints:
Code: [Select]Array

Not capturing all the information we require in the form.......
Hi Guys,

I was wondering if you would share some more of your knowledge today, I'm hoping it

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