Dispalying Arrays - Again

From: Date: Tue, 15 Apr 2003 00:52:55 +0000
Subject: Dispalying Arrays - Again
Groups: php.general 
Request: Send a blank email to php-general+get-143853@lists.php.net to get a copy of this message
I'm trying to display the values of two arrays together and am having the hardest time. //SET THE ARRAYS do { $z['username'][] = $row_rsUSERS['username']; $z['distance'][] = $totaldist; //SORT asort ($z['distance']); reset ($z['distance']); } while ($row_rsUSERS = mysql_fetch_assoc($rsUSERS)); //OUTPUT while (list ($key1, $val1) = each ($z['username'])) { //DISPLAY KEY AND VALUE OF USERNAMES echo "$key1 = $val1<br>"; //THIS IS WHAT I'M THINK SHOULD DISPLAY VALUE OF BOTH //DISPLAYS NOTHING THUS FAR echo $z['username'][$val1].",".$z['distance'][$val]."<BR>"; } Anyone, please? Thanks

« previous php.general (#143853) next »