Example: How to Embed Two Views on the Same Page
In this view, the view takes an argument of the Node Title type, set to 1 letter long. This means that views/example/A will give all matching nodes that start with the letter A. What I really want,
though, is for the top of the view to contain the summary of the view and for the bottom of the view to contain the current letter.
The easiest solution is to put the summary view in the header of the view, but one MUST be careful here; embedding a view within a view could lead to an infinite loop as it tries to replicate itself to
infinity. Fortunately for us, the summary is themed separately from the main view, and doesn't include header.
So what we'll do is put put a PHP snippet into the header of the view and set the Input Filter to PHP code.
This view needs to have just one argument; it's possible to do this with more arguments but you need to theme the summary as well, and check where you actually are. Be sure that argument is set to provide a summary!
<?php
// load a second copy of the view -- unfortunate but we don't have access
// to the existing one.
$view = views_get_view('VIEWNAME');
// the array() indicates no arguments, which will provide the summary view.
// We also don't want the pager for this view.
print views_build_view('embed', $view, array(), false, false);
?>See also the example of the comma separated list summary, which goes well with this.

Variation: How to Embed Two Different Views with Same Argument
This is a variation on the example above.
Let's take two different views, view 1 and view 2, that have exactly the same arguments. You want the top of view 1 to contain not the summary of view 2, but view 2 itself, with the same arguments view 1 is currently being provided.
The solution is to put the following PHP snippet into the header of view 1 and set the corresponding Input Filter to PHP code:
<?php// This is a new variable introduced in Views module revision v.1.94;
// it conveniently gives one access to the current view (in this example, view 1)
global $current_view;
// Let's now load view 2
$view = views_get_view('VIEW2NAME');
// $current_view->args contains the arguments view 1 is currently being provided with;
// we can now build view 2 with exactly the same arguments as view 1
print views_build_view('embed', $view, $current_view->args, false, false)
?>
All credit goes to merlinofchaos who helped me work this out.
One warning
Thanks a lot for this code!
I just have one warning. I have multiple Views applied to my home page. Of those Views, the ones that are secondary (the Views that are being called into the main View) I did not enter a URL for them. I didn't see the need since they were just being called in. Anyway, this caused my 404 page to wig-out and show a secondary View instead of the 404 page content. I simply entered URLs for all the Views being applied to that page and, voila, no probs.
I want paging on the secondary views too
Is it possible to use paging on the secondary views that you are calling into the main view? Right now I'm just getting paging for the main view and would like it for all the views on the page. I currently have 4 views going on 1 page (the home page) and everything is working nicely except for this. Thanks in advance :-)
Nevermind
I got it figured out. I built upon this post and posted a Site Recipe - HOWTO: Create mulitple Views on one node with paging - check it out here: http://drupal.org/node/85720.