How do I set the page title from view result (same as the view result) I have set up a View that shows a random page from the site filtered according to node types and uses the Global : Random (asc) sort criteria. It displays only one result per page and a fresh page is shown every time the page is refreshed. 

I want to set the view's page title to be same as the node displayed. I am doing this using javascript right now, but would prefer a PHP alternative that I could either use in the template or the views setting directly.

Setting the page title using javascript isn't SEO friendly.

I am using the latest version of Drupal 6 with the latest stable release of Views 3.

The results of print_r($view-&gt;result, true) (as requested) are : 

Array
(
    [0] =&gt; stdClass Object
        (
            [_random] =&gt; 0.00171253550957193
            [radioactivity_node_1_s_energy] =&gt; 3
            [node_title] =&gt; &lt;Title of the node being displayed&gt;
            [nid] =&gt; 393
        )

)
Inside a views template, you could call drupal_set_title() with whatever you want out of the $view-&gt;result array.  You can put a drupal_set_message('&lt;pre&gt;' . print_r($view-&gt;result, true) . '&lt;/pre&gt;'); or its equivalent in there to see what you have to work with.

In Style Settings, just click on Theme Information, and choose one, I'd suggest modifying the Style Output one because you could also change $title in there as well.

ADDITIONS DUE TO COMMENTS:

No, views will not set this for you, I thought that's what you were asking.

In your views template for the view in question, you need to dig into your row result to get the value you want and then call drupal_set_title() with that.  Calling it with a null value only returns the existing title, if any.

For example, if you put the print_r() of your result in there, you will see what values you have to work with, and then you use them with this to set the title.

Let's say you have something like this:

[0] =&gt; stdClass Object
    (
        [node_title] =&gt; Sirens
        [nid] =&gt; 240
        [_random] =&gt; 0.000554758124570137
    )


which is the view result from a view I just put together that randomly returns node titles, you would do something like this in your template:

$title=check_plain($view-&gt;result[0]-&gt;node_title);
drupal_set_title($title);


You could also put this in a pre_render() hook like so:

function YOURMODULE_views_pre_render(&amp;$view) {

  if ($view-&gt;name==NAMEOFYOURVIEW) { // &amp;&amp; $view-&gt;current_display == 'page' if needed
    $title=check_plain($view-&gt;result[0]-&gt;node_title);
    drupal_set_title($title);
  }

}


But either way, since I don't know exactly what your view row looks like, I can't tell you precisely what $view-&gt;result[0]......  you need.

Also, all of this is assuming your theme behaves nicely with the $head_title variable as well.