i am having a "nonsense" problem with php. The first loop is supposed to get a certain record from the table and compare it to all the record in the second table...
So i expected it to print 41 "2nd"'s after every "1st"'s. Since there are 41 records in the second table. But instead the while loop works the first time and ignores the second while loop afterwards.
The result i get:
1st2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd2nd1st1st1st1st1st1st1st1st1st1st1st1st1st1st1st1st1st1st1st1st1st1st1st...
while($row = mysql_fetch_array($select))
{
echo "1st";
while($row2 = mysql_fetch_array($select2))
{
echo "2nd";
$string = $row2["header"];
$find = $row["email"];
if(strstr($string, $find)) {
$email = $row["email"];
echo "found it";
} else {
//no email found
}
}
}