It's simple. You'd be using HTML tables and PHP loops. For each heading you create a table column with product A, product B, etc. Then for each result you have for a country you loop trough those results using table rows. With that you construct a nice HTML table with your database results.