Command "sofia xmlstatus profile internal reg" returns contact in this format:
"Contact Name" <sip:236@10.0.15.108:5060;>
Only Aastra phones send Contact name with REGISTER message.
I tested Grandstream and Polycom phones, but contact name is missing.
Adding just " <td class='".$row_style[$c]."'>".$row['contact']."</td>\n"; will produce same visible result because <sip:....> portion will be hidden.