Arrays and Recordsets

From: Date: Mon, 14 Apr 2003 18:44:58 +0000
Subject: Arrays and Recordsets
Groups: php.general 
Request: Send a blank email to php-general+get-143824@lists.php.net to get a copy of this message
Someone sent me this code and I've gotten it to work. //This is the first loop to make the array minus //the other stuff you have already seen //TRACK CURRENT ZIP AND DISTANCE $z['distance'][] = $totaldist; sort ($z['distance']); reset ($z['distance']); } while ($row_rsUSERS = mysql_fetch_assoc($rsUSERS)); //Second loop to create output while (list ($key, $val) = each ($z['distance'])) { echo "$key = $val<br>"; } So far so good. Now I want to add other info from the recordset. What I need is user ids so I thought I would use this instead: $z['id'][] = $row_rsUSERS['id']; But how do I make this work with the above to print out the user name along with the the distances? Make sense? Thanks

« previous php.general (#143824) next »