Monkuar Posted September 18, 2012 Share Posted September 18, 2012 $result = $db->query('SELECT gold from users WHERE id IN ('.$ids100.')') or error('Unable to fetch forum topic count', __FILE__, __LINE__, $db->error()); while ($gold = $db->fetch_assoc($result)){ $usersgold[] = $gold['gold']; } foreach (array_unique($winninguser_ids100) as $user_id[$usersgold]){ echo var_dump($user_id) .'<br>'; } var_dump shows NULL/blank? why? I need to pass the $usersgold[] as a key for each $user_id, how? In other words, I need to the $usersgold[] array to pass through with $user_id so I can use it in the for loop. Link to comment https://forums.phpfreaks.com/topic/268483-how-do-i-grab-and-throw-in-another-array/ Share on other sites More sharing options...
Jessica Posted September 18, 2012 Share Posted September 18, 2012 http://us.php.net/manual/en/control-structures.foreach.php Link to comment https://forums.phpfreaks.com/topic/268483-how-do-i-grab-and-throw-in-another-array/#findComment-1378764 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.