i'lld be inclined to create a foreach loop, you can then keep track of host etc and ignore the duplicates
very basic example that will exclude duplicate host values
foreach($foo){
if(!in_array($foo['host'],$host){//check if named host already been processed
$out[]=$foo;
}
$host[]=$foo['host'];//keep the values of host in an array for checking
}