Re: Dispalying Arrays - Again

From: Date: Tue, 15 Apr 2003 01:27:53 +0000
Subject: Re: Dispalying Arrays - Again
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-143855@lists.php.net to get a copy of this message
OK, thanks fo rthe suggestions, but that doesn't answer my question. Now I have: do { //SET ARRAYS $z['username'][] = $row_rsUSERS['username']; $z['distance'][] = $totaldist; } while ($row_rsUSERS = mysql_fetch_assoc($rsUSERS)); asort ($z['distance']); reset ($z['distance']); foreach ($z['username'] as $key => $value) { echo "$key = $value<br>\n"; } foreach ($z['distance'] as $key => $value) { echo "$key = $value<br>\n"; } Which displays something like this: for $z['username'] 0 = vernman 1 = Marc 2 = rich69 3 = lata7 for $z['distance'] 0 = 0.0 4 = 14.9 9 = 15.0 1 = 67.6 which what I'm looking for is vernman, 0 Marc, 14.9 rich, 15.0 lata, 67.6

« previous php.general (#143855) next »