Group search result of drupal 7 and show them in tabs
Thank you for sharing. I made some minor changes in your code because I was getting some floating search results. So I changed this part:

    $output .=  '&lt;div id="tabs-'.$i.'"&gt;';
    $output .=  $value;
    $output .=  '&lt;/div&gt;';

}
    $output .= '&lt;/ul&gt;';
    $output .= '&lt;/div&gt;';

     $variables['search_results'] = $output;


To this:

$output_results .=  '&lt;div id="tabs-'.$i.'"&gt;';
$output_results .=  $value;
$output_results .=  '&lt;/div&gt;';

}
$output .= '&lt;/ul&gt;';
$output .= $output_results;
$output .= '&lt;/div&gt;';

 $variables['search_results'] = $output;