I try to load a codeigniter view in iframe as,
`<iframe src="<?php $this->load->view('lists');?/>"></iframe>`
But the page could not load.
With out i frame its working.
How do i load this view in iframe ?
['https://Stackoverflow.com/questions/15501034', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1939388/']
create a function in your controller

```
//project.php

function view_list()
{
$this->load->view('lists');
}

```

and call in the view page like this

```
<iframe src="<?php echo site_url('project/view_list');?>">>    </iframe>

```
You can't assign plain html to iframe elements src attribute. You should have a controller that render your html and then set src attribute to that controller.

```
<iframe src="<?php echo base_url( 'controller_that_render_list_html' ) ?>"></iframe>

```