Do you mean if(!empty($host['domain']))? But "0" would give false, and "0" is a valid hostname and a valid domainname as far as I know...?