Question: I created a view block, whose machine name is "news." 

How do I display it using `module_invoke()` and the machine name of the view?

Answer: 
If you want to pass a parameter to the view use: 

```
echo views_embed_view('view_machine_name', 'block_1', $param);

```

For example:

```
echo views_embed_view('view_machine_name', 'block_1', $node->nid);

```

or:

```
echo views_embed_view('view_machine_name', 'block_1', $nid, $uid);

```
This Worked for me :

```
$view = views_get_view('view_machine_name');
$view->set_display('Master');
$view->get_title();
$response = $view->preview('You_Block_id');

```

//and called it in html like this//

```
<div class="col-md-4 col-sm-6">
<div class="blocksOuterWrapper companyNewsWrapper">
'.$response.'
</div>
</div>

```