Setting options in a Views display.

Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in _menu_load_objects() (line 579 of /var/www/drupal-7.x/includes/menu.inc).
Published by Matthew Davidson on Thu, 04/10/2012 - 11:40am in
<?php
$view = views_get_view('viewname');
$view->set_display('displayname');
$view->display_handler->set_option('title', 'My New Title');
$view->save();

Awesome.