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

Post, not working, please help
The error is:
Method Not Allowed
The requested method POST is not allowed for the URL /student

Something Non-Traditional. Can we solve?
I have an idea for an application here. It's mostly flash, but it couldn't work without a somewhat n

PHP webpage & array print issue
I have this code running, and it works perfectly … however, see my bottom bit about what I see

Javascript form submit and radio buttons?
When this form is submitted, it is automatically resubmitted using JS.

All my fields are carr

problem with script manager
Hi iam using Net.2005.I have created ajax enabledwebsite.i have master page in which i have script m

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

PHP page loading in Firefox but not in IE
hello,

i am currently doing a project in PHP and i have a problem. If I view the project in M

Prevent PHP mail( ) from appending hostname to from address
Hey guys,

I want to be able to send texts to phones via email (since each phone has their own

Problem executing bash script using shell_exec
Hi there,
I created a bash script file using following code to convert doc documents to pdf using

help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:

Parse error: syntax error

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