Here's an example of how to display the results:
while ($r2 = mysql_fetch_array($result2)) {
$currentThing = $r2['thing']; // Where 'thing' is the column name
$currentType = $r2['type']; // Where 'type' is the column name
// This stores the values of those columns as $currentThing and $currentType, respectively. You can now use those values in your PHP code, so long as you're still within the loop.
echo "
Thing: $currentThing<br>
Type: $currentType<p>
";
} // A common mistake is to leave out the last brace of the while loop
The way this works is that each time through the loop, it assigns the value of the column to the variable. Then it runs the echo() "function" to output to the browser the results.
If I didn't explain this well enough, let me know and I'll try to resolve any confusion.