How do I embed a view inside a node? In Drupal 6 a view can be embedded into a node as follows:

$viewName = 'LatestNews';
print views_embed_view($viewName);


This does not work for drupal 7.  What is the function to embed views in drupal 7?
In Drupal 7 you can use this code.


For a view page

print views_embed_view('name_of_view','page_1', $node-&gt;nid);

For a view block

print views_embed_view('faculty_core','block_1', $node-&gt;nid);