How to retrieve drupal views content using PHP Code
use the following php code for retrieve drupal 6 views content:
$display = 'page_1'; // 'page_2' or 'block_1' etc
$view = views_get_view('view_name');
$display = $view->execute_display('block_1', $myArg);
print $display['content'];
?>
$display = 'page_1'; // 'page_2' or 'block_1' etc
$view = views_get_view('view_name');
$display = $view->execute_display('block_1', $myArg);
print $display['content'];
?>
Comments