Ideas for simplificaton - Logic to choose which view to load
Based on your answer, you should put the mapping in an array and create a for each loop. Maybe it would also be a good idea to extract the strtoupper($hardwarename) in a local variable that you don't do it in any if in the worst case. In addition to that you missed to add a default case, which might lead to an error in loading the template. Furthermore you have to move the longer DELL check in front of the shorter otherwise you will never reach this branch.

private function checkhardwarename($hardwarename)
{        
    $mapping=array("HP"=&gt;"hp",
                   "DELL%20SF"=&gt;"dell_sf",   
                   "DELL"=&gt;"dell");
    $hardwarename=strtoupper($hardwarename);

    foreach ($mapping as $needle=&gt;$viewname) 
    {
        if (strpos($hardwarename, $needle) !== false) return $viewname;
    }

    return "default";
}