title: find value in array cakephp
body: <p>Hey guys I am trying to get a value from an array in my events_controller.php file.
  Event belongsTo Entity and Entity hasMany Event. I need this value to perform some other logic but im really stuck and i know it should be an easy thing to do.</p>
  
  <p>I am trying to get the value of Entity.user_id from this array.</p>
  
  <pre><code>Array
  (
  [Event] =&gt; Array
      (
          [id] =&gt; 19
          [entity_id] =&gt; 8
          [name] =&gt; new event
          [time_start] =&gt; 2011-02-26 19:09:00
          [time_end] =&gt; 2011-02-26 19:09:00
          [dateStart] =&gt; 0000-00-00
          [dateEnd] =&gt; 0000-00-00
          [description] =&gt; jgiuguygo
          [ageRange] =&gt; 67
      )
  
  [Entity] =&gt; Array
      (
          [id] =&gt; 8
          [user_id] =&gt; 14
          [location_id] =&gt; 15
          [type] =&gt; EVENT
      )
  
  [Eventfeedback] =&gt; Array
      (
      )
  )
  </code></pre>
  
  <p>the above matrix i obtained with this code:</p>
  
  <pre><code>$value = $this-&gt;Event-&gt;read();
  pr($value);
  </code></pre>
  
  <p>Now this is as close as I can get...</p>
  
  <pre><code>Array
  (
  [Entity] =&gt; Array
      (
          [user_id] =&gt; 14
      )
  
  [Event] =&gt; Array
      (
          [id] =&gt; 19
      )
  
  [Eventfeedback] =&gt; Array
      (
      )
  )
  </code></pre>
  
  <p>with this code</p>
  
  <pre><code>$value = $this-&gt;Event-&gt;read('Entity.user_id');
  pr($value);
  </code></pre>
  
  <p>An last try i got this array</p>
  
  <pre><code>Array
  (
  [Entity] =&gt; Array
      (
          [id] =&gt; 1
          [user_id] =&gt; 11
          [location_id] =&gt; 8
          [type] =&gt; sdfsdfdsf
      )
  
  [User] =&gt; Array
      (
          [id] =&gt; 11
          [firstName] =&gt; luis
          [lastName] =&gt; pooya
          [username] =&gt; admin
          [password] =&gt; 94c882c8506497a9f031ca5a4db6d0143c97fe45
          [role] =&gt; admin
          [email] =&gt; some
      )
  
  [Location] =&gt; Array
      (
          [id] =&gt; 8
          [name] =&gt; First Nation University of Canada
          [xCoordinate] =&gt; 0
          [yCoordinate] =&gt; 0
      )
  
  [Establishment] =&gt; Array
      (
      )
  
  [Event] =&gt; Array
      (
      )
  
  [Vmachine] =&gt; Array
      (
      )
  )
  </code></pre>
  
  <p>with this code</p>
  
  <pre><code>$value = $this-&gt;Event-&gt;Entity-&gt;find('user_id');
  pr($value);
  </code></pre>
  
  <p>Hope someone can help me out. Thanks in advance.Luis</p>