Help: Two dimensional array from table

From: Date: Fri, 07 Apr 2006 15:27:28 +0000
Subject: Help: Two dimensional array from table
Groups: php.db 
Request: Send a blank email to php-db+get-41665@lists.php.net to get a copy of this message
I created an array to pull data out of one column in database. <?php //Code for registered $usrregid = array(); do { $usrregid[] = $row_rs_usr_usr["usr_id"]; } while($row_rs_usr_usr = mysql_fetch_assoc($rs_usr_usr)); //end of registered ?> However I now need a second column from the table and think a two dimensional array is the right way to go. Having a problem though in defining. Most of the examples I found don't seem to apply to pulling the values from a db. I tried this and while it returns no errors, it also returns no value. <?php //Code for registered $usrreg = array("id", "date"); do { $usrreg[] = $row_rs_usr_usr["usr_id"]["usr_date]; } while($row_rs_usr_usr = mysql_fetch_assoc($rs_usr_usr)); //end of registered ?> Am I defining wrong or pulling the values wrong ? TIA Mark __________________________________________ Organize. Communicate. Share. @ http://www.goowy.com

« previous php.db (#41665) next »