I have a program which presents a single random selection from the database each time it is run. What I would like to do is have the selections sorted by activity level and then have the selection title shown in a color which represents how active the random selection is.
For example: Item 1 is 45 days old, Item 2 is 61 days old and Item 3 is 10 days old.
The time range is: 1-45days (black), 46-60days (purple) and over 61days (blue)
I would like the PHP to sort the Items and when the program is run I would want the random item selected to be color coded so that: If Item 3 was chosen the text for the items title would be in color:#000000 If Item 1 was chosen the text for the items title would be in color:#770077 If Item 2 was chosen the text for the items title would be in color:#0000ff
The existing PHP program does not have any variable dealing with the age of the item or with coloring the items title. I am a almost complete novice with PHP (just bought Larry Ullman's book on the subject) so I do not even know if this can be done but I figured I would ask and see...