Thank you very much Jason, I really appreciate your helpful insight and professional manner in your resolving this issue.
I do hope it is okay to post the correction here?
we resolved this in a connect meeting by changing:
$domArr = explode("\.",$domainName);
$domArr = explode(".",$domainName);