title: Undefined variable in view page
body: <p>I can't passing the variables in view page</p>
  
  <p>this is my controller code</p>
  
  <pre><code>&lt;?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  
  class Management extends CI_Controller {
  
          public function __construct()
         {
              parent::__construct();
              if($this-&gt;session-&gt;userdata('level') != 1){
                  redirect('');
              } 
          }
  
  
          public function hotels()
          {   
  
                  $this-&gt;load-&gt;model('model_hotels');
  
                  $ss['most_view_hotels'] = '23';
                  $this-&gt;load-&gt;view("management/header_mng_view");
                  $this-&gt;load-&gt;view('management/hotels_mng_view' , $ss , true);
                  $this-&gt;load-&gt;view("management/footer_mng_view");
          }
  
  }
  </code></pre>
  
  <p>this is the error</p>
  
  <blockquote>
    <p>A PHP Error was encountered</p>
    
    <p>Severity: Notice</p>
    
    <p>Message: Undefined variable: most_view_hotels</p>
    
    <p>Filename: management/hotels_mng_view.php</p>
    
    <p>Line Number: 22</p>
  </blockquote>
  
  <p>hotels_mng_view.php</p>
  
  <pre><code>&lt;?php 
    echo $most_view_hotels;
    foreach($most_view_hotels as $value):
  ?&gt;
    &lt;div class="row"&gt;
    &lt;div class="cell en"&gt;adsf&lt;/div&gt;
    &lt;div class="cell en"&gt;1212&lt;/div&gt;
    &lt;div class="cell en"&gt;12&lt;/div&gt;
    &lt;div class="cell en"&gt;32&lt;/div&gt;
    &lt;/div&gt;
  &lt;?php endforeach;?&gt;
  </code></pre>