You could just say what you mean:
if( ($selectedhomeuni == "all" || $selectedhomeuni == $homeuni)
&& ($selectedhostuni == "all" || $selectedhostuni == $hostuni)
&& ($selectedlocation == "all" || $selectedlocation == $location)
&& ($selectednationality == "all" || $selectednationality == $nationality)
)
{
return $html;
}