I have a MySQL database with 35 different columns labeled 1-35. The data is displayed in a dynamic table. I am looking for the PHP code that would allow me to apply a CSS class to specific cells based on what is returned inside them.
EXAMPLE: Column 1 can return either TRUE or FALSE value. If a TRUE value is returned, I want to give that cell a different background color, or highlight it.
I have the CSS class as:
.highlight {
background-color: #FC0;
}
After the CSS class has then been applied to the specific cells from columns 1-35, I would like the PHP code that can total the number of highlighted cells in the column labeled TOTAL.
Can’t seem to find the PHP code to tie all this together. If someone could advise, I’d be very grateful.
and then…
EDIT: Sample code…