> 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 >
You mean like: imgBkgrnd = array("1"=> "bkgrnd-default.gif", "2" => "bkgrnd-positive.gif", "3" => "bkgrnd-negative.gif"); http://us2.php.net/manual/en/function.array.php -- --Matthew Sims --<http://killermookie.org> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php