The database stores information about the color of this cell.

printf( ' <p> Выберите время приема:</p><br /> <table width="40" border="0"> <tr> <td class="%s">%s </td>',$myrow['value'], $myrow['time']); <td class="%s"> ---- думал таким способом задать класс, а в классе прописать все свойства. 

Does not work. What is the error and are there any other options for implementation?

  • Found a mistake. problem with the database was. And what other ways can there be? - Radik Kamalov

1 answer 1

There is another option how to paint the columns:

 .table td{background:#f00} .table td + td{background:#0f0} .table td + td + td{background:#00f} 

And in your version, I would write to the database not the classes themselves, but their numbers, for the subsequent generation of classes like .tdbg1, .tdbg2 ...