I have never come across this problem with mssql.
It might be something simple like you are using $line['FIELDNAME'] when the db is returning "TBLNAME.FIELDNAME". You can check this quite simply by using any of the GUIs for running queries against the db and see what it presents for the column headers, or just try adding the tbl_name/tbl_alias and see if it works.
Hope this helps 😉