Welcome Guest, Not a member yet? Register   Sign In
Kill cached data (view)
#1

[eluser]Ketchxup[/eluser]
Hey,
I'm trying to load a view file twice

view:
Code:
<?php foreach ($URL as $val):?>
<li><h3>&lt;?=$val?&gt;</h3></li>
&lt;? endforeach;?&gt;
</ul>

I create a function to load the viewfile. The array $data is loaded from the database.

Code:
function some($data)
{
  //...

  foreach( $data as $v )
  {
   $r .= $this->load->view('modules/viewfile', $v, TRUE);
  }
return $r;
}

The problem is that second continuity from the loop also contains data from the first continuity it just sum it up. I suggest the var $URL is cached somewhere
I already try to unset it but i failed:
Code:
$this->load->_ci_cached_vars[$key]

thx
#2

[eluser]Ketchxup[/eluser]
SOLVED
#3

[eluser]Unknown[/eluser]
I know that this is an old old thread, but I've encountered the same issue with 'cached' view data and was wondering if you would share your answer.




Theme © iAndrew 2016 - Forum software by © MyBB