If you want to use results twice in the same routine then look at mysql_reset() which allows you to reset the row pointer back to the first row. mysql_seek(0) will do the same. If you want to 'store' the results and use them later but in the meantime you have mysql_close()'d the connection then load the result set into a global array.
Cheers,
Cris