title: cake php, undefined variable problem
body: <p>i have a controller page like this:</p>
  
  <pre><code>class UsersController extends AppController {
  var $helpers = array ('Html','Form');
  var $name = 'Users';
  
  function index() {
      $this-&gt;set('view_users', $this-&gt;User-&gt;find('all'));
  }
  }
  </code></pre>
  
  <p>then i have another controller page like this:</p>
  
  <pre><code>    class PostsController extends AppController {
  var $helpers = array ('Html','Form');
  var $name = 'Posts';
  
  function index() {
      $this-&gt;set('edit_users', $this-&gt;Post-&gt;find('all'));
  }
  }
  </code></pre>
  
  <p>then i have the index file:</p>
  
  <pre><code>&lt;?php foreach($view_users as $value): ?&gt;
  &lt;p&gt;id - &lt;?php echo $value['User']['first']; ?&gt;&lt;/p&gt;
  &lt;?php endforeach; ?&gt;
  
  &lt;?php foreach($edit_users as $value): ?&gt;
  &lt;p&gt;id - &lt;?php echo $value['Post']['first']; ?&gt;&lt;/p&gt;
  &lt;?php endforeach; ?&gt;
  </code></pre>
  
  <p>the problem i get is :<code>Notice (8): Undefined variable: view_users [APP\views\posts\index.ctp, line 6]</code></p>
  
  <p>very strange since the <code>edit_users</code> var works.</p>
  
  <p>What can be the problem?
  thanks</p>