gazalec Posted April 5, 2007 Share Posted April 5, 2007 Hi guys trying the impossible again, ok well i was wondering if this would be possible, ok so i have an order_date and no_of_products variable pulled from a database $a $b (lets say they are 2007-03-01 and 200) respectivley, i was wondering if it would be possible to write an HTML table through PHP like this <? echo "<table> <tr> <td> ETC. but i was wondering if it was possible to have each cell given an id to equal one date plus a quantity for instance <td id='2007-03-01-100'> but i was wondering if there was anyway to have the color attribute have an if condition i.e. $func = if('id' = $a."-".$b){ echo "000000"; }else{ echo "FFFFFF"; } echo "<td id='2007-03-01-200' color='".func."'> The idea is if a number of products is bought on a date if this is parallel to the table the cell is turned black Thanks For any help on this one guys...and girls. Link to comment https://forums.phpfreaks.com/topic/45753-table-cells-php-color-possiblity/ Share on other sites More sharing options...
monk.e.boy Posted April 5, 2007 Share Posted April 5, 2007 Have you answered your own question? Every question you posted you also answered. Hm? I'm confused. monk.e.boy Link to comment https://forums.phpfreaks.com/topic/45753-table-cells-php-color-possiblity/#findComment-222235 Share on other sites More sharing options...
gazalec Posted April 5, 2007 Author Share Posted April 5, 2007 I'm sorry i dont understand what you mean Link to comment https://forums.phpfreaks.com/topic/45753-table-cells-php-color-possiblity/#findComment-222240 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.