Re: [PHP-DB] fetch array problems.

2001-03-28 Thread Felix Kronlage
On Wed, Mar 28, 2001 at 01:08:35AM -0700, John Starkey wrote: table bgcolor="'.$color[color_1].'" class="nav" .. '; I can't get $color[color_1] to return a value. It's in the db and color_1 is a valid table containing a hex value. This is my first attempt at using assoc. arrays. I'm

[PHP-DB] fetch array problems.

2001-03-27 Thread John Starkey
Hello all. Can someone tell me what I'm doing wrong here? $sql = "SELECT * FROM user_prefs WHERE u_id='$UserID'"; $result = mysql_db_query($sql); $color = mysql_fetch_array($result); echo ' table bgcolor="'.$color[color_1].'" class="nav" .. '; I can't get $color[color_1] to return a