Same name, different tables

If I have two tables ‘books’ and ‘movies’ and each table holds the name of its product in a ‘name’ column, how can I capture both results with the query while statement below?

“SELECT, FROM books, movies”

…will get me both columns but since they have the same name, I don’t know how to get them:

while($line = mysql_fetch_assoc($result)){
echo $line["name"] //Only gets me one column.
//this doesn't work echo $line[""]