This is a string parsing problem. See the PHP documentation on variable parsing.
The problem is that the index is written without quotes when using simple syntax (without curly braces).
You can either use curly braces around your variables:
$result = mysql_query("INSERT INTO movies (id, title, year) VALUES({$arr['title_id']}, {$arr['title']}, {$arr['year']})");
Or you can concatenate strings and variables together with dots, avoiding string parsing altogether:
$result = mysql_query('INSERT INTO movies (id, title, year) VALUES('.$arr['title_id'].', '.$arr['title'].', '.$arr['year'].')');
Or leave out the quotes, but this doesn't look too clean:
$result = mysql_query("INSERT INTO movies (id, title, year) VALUES($arr[title_id], $arr[title], $arr[year])");