You can either hard code the associations, with something like a swtich statement, or i suppose loop thru one array, adding a key value pair of the numbers => background images. Or, you could create a table called Backgrounds, give them an id which you store in the existing field of your db, and use a table join to query the background name out . Does this help any?
Jason On Fri, 23 Jul 2004 16:02:06 -0500, Robb Kerr <[EMAIL PROTECTED]> wrote: > I've got a field in my database that contains a single numerical character > ("1" or "2" or "3", etc.). I need to load a different background image in > one cell of a table depending upon what the number the field contains. > What's the easy syntax for associating entries in the field ("1" or "2" or > "3", etc.) with image filenames ("bkgrnd-default.gif" or > "bkgrnd-positive.gif" or "bkgrnd-negative.gif", etc.) > > Thanx, > Robb > > -- > Robb Kerr > Digital IGUANA > Helping Digital Artists Achieve their Dreams > ---------------------------------------------------- > http://www.digitaliguana.com > http://www.cancerreallysucks.org > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php