I have two databases, each containing email addresses of users. I've written a script that has the sole purpose of seeing which email addresses exist in both databases.
With that being said, please look at the following loops. Each loop contains hundreds of records (I've printed out the results from each as a verification). However, when the conditional finds a match, the conditional only matches against the email address from the first match. It remains "stuck" on the one record it matched from the initial query. In other words, if it matched on "[email protected]", then all future comparisons are against "[email protected]". It's almost like I need a "next()" method to move things along from the first array.
FWIW, I'm a complete PHP noob, so I'm sure there's something obvious I'm missing here.
while($member = mysql_fetch_array($members)){
while($emailAddress = mysql_fetch_array($emailAddresses)){
if ($member['email'] == $emailAddress['email']){
echo $member['email'] . "<br/>";
}
}
}