Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Arrays...

Status
Not open for further replies.

rjonesX

Technical User
Jun 18, 2001
56
US
Im working with a mysql result of just user ids and and a url...

$row[uid] and $row I want to move it into an array..... => [URL unfurl="true"]http://www.google.com,
17982363 =>
)


Im looping through using...

while($row = mysql_fetch_array( $client_result )) {

???WHAT GOES HERE???

}


any ideas
 
Just put them into the associative array and setting the key to the UID. This will - of course - only work properly with uinque UIDs.
Code:
while($row = mysql_fetch_assoc($client_result)){
   $myArray[$row['uid']] = $row['url'];
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top