How to get a same result of Views with Random Sort Criteria
if its in the same context, you can assign a variable and print it twice

$output = views_embed_view("library","block_0",$term-&gt;tid);

print $output;
print $output;


if that is not the idea, you could simply do what views_embed_view() does manually by loading the view first which gives you access to the content, and then calling the preview - here's the code from the function:

function views_embed_view($name, $display_id = 'default') {
  $args = func_get_args();
  array_shift($args); // remove $name
  if (count($args)) {
    array_shift($args); // remove $display_id
  }

  $view = views_get_view($name);
  if (!$view || !$view-&gt;access($display_id)) {
    return;
  }

  return $view-&gt;preview($display_id, $args);
}