jd2007 Posted July 10, 2007 Share Posted July 10, 2007 while ($record = mysql_fetch_assoc($result)) { while (list($fieldname, $fieldvalue) = each ($record)) { echo $fieldname.": <B>".$fieldvalue."</B><BR>"; } echo "<BR>"; } the code above echos '$fieldname.": <B>".$fieldvalue."</B><BR>"' for each record the same way. what should i do if i want the second record displayed a different way for e.g. '$fieldname.": <I>".$fieldvalue."</I><BR>"' ? Quote Link to comment Share on other sites More sharing options...
AndyB Posted July 10, 2007 Share Posted July 10, 2007 .. and what would you want done with the third record, etc.? Outputting the information in tabular form with alternating row colours might serve your needs. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.