I have three tables for listing products with product attributes
Product Table with dummy data


Product_Attributes with dummy data


Attributes with dummy data


Kespersky antivirus (productid = 1) has no attributes but the iPhone (productid =2) has two attributes applicable to it, memory and resolution both in Attribute table which has its value stored in Product_Attribute table.
How do I join these tables to show/display both the products with there corresponding attributes?
EDIT
I need to display these products as

The following will work for any number of attributes: