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

Recording popularity by day, week.. all time?
Hey everyone, I'm creating a site designed around users uploading music. How can I implement a syste

animation progress while uploading files?
Hello, i have some website form to upload few files to server. i want to put some gif animation whi

utf8_general_ci error ??
I have all kinds of data to be inserted in database table

//I am getting this error

Yo

dropdown menu
Hello everbody,

I am php newbie.
I need to develop a program that once click the drop do

styling a RadioButtonList
HiI need to have a radio button and close to it, its lable, then a space then another set of those.

problems with script
I made a small script wich exchanges points in my website:


<?php
session_start

how to get values from $_Post with onchange="form.submit();"?
Hi, I have a form that submit to itself with a file upload field and two other hidden field values.<

Multiple includes losing variables
Hey all,

just starting out w php and ran into a problem pretty quickly. I'm
including seve

using variables in another page
I have a test database set up on localhost. I have a form that I can type a name into, hit the butto

admin with my register system?
Hey i wana make it so i can make a admin level on my register system , I'm kinda new to php to im no

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