php-db | 2001072
Date: 07/24/01
- Next message: Chris Hobbs: "Re: [PHP-DB] Dynamic Links"
- Previous message: deco: "[PHP-DB] log out"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
You've got to call it by $tbl[0]["hardware"]
greetings
Thomas
-- -- 4Ws Netdesign GbRwww.webinside.de... ..wir machen Homepages -- "Cody Caughlan" <codyc <email protected>> schrieb im Newsbeitrag news:3916B8D1.6D681792 <email protected> > Hello, > > I am implementing an "excel" like webpage, that is multiple boxes like a > multi-dimensional array. The trick is each row has to have a unique DB > key. > > My problem is this. > > ### BEGIN CODE ### > $rownum = 0; > while($row = <email protected>($res, MYSQL_ASSOC)) > { > > $tbl[$rownum] = $row; > $rownum++; > } > ### END CODE ### > > so if I have a field called "hardware" in my table, I should be able to > access it by > > print "$tbl[0][hardware]"; > > (assuming that the DB query succeeded in getting some rows.) > > When I do this, my print statement outputs > > Array[hardware] > > But if I was call a print statement like: > > print "$row[hardware]"; > > INSIDE my while loop above, it outputs as expected. > > What gives? > > Thank you. > - > -------------------------- > Cody Caughlan > codyc <email protected>
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Chris Hobbs: "Re: [PHP-DB] Dynamic Links"
- Previous message: deco: "[PHP-DB] log out"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

