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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.