How to get a same result of Views with Random Sort Criteria There is a View which it's Sort Criteria is Random.I have to use the following code to implement two different displays of one view.

print views_embed_view("library","block_0",$term-&gt;tid);
$views = views_get_view_result("library","block_0",$term-&gt;tid);
//some other codes that retrieve data from $views


The problem is, because the View is Random the above two lines return different results while I need to have one. How do I can solve this problem?
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);
}