Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question colouring a row in a dynamic table

    How do I set a colour for a row in a dynamic table based on a mysql query from a field called colour?
    Best Regards,
    Tim

  • #2
    Regular Coder
    Join Date
    Sep 2004
    Posts
    230
    Thanks
    1
    Thanked 0 Times in 0 Posts
    PHP Code:
    while ($row mysql_fetch_array($resultMYSQL_ASSOC)) {
       echo 
    "<tr style=\"background-color: ".$row['colour'].";\">";
       echo 
    $row['data'];
       echo 
    "</tr>";



  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •