title: find value and call another value - php arrays
body: <p>I have the below array coming though, ideally I am looking for a way of matching one value and printing out another value.</p>
  
  <p>e.g. </p>
  
  <pre><code>if($randomvalue  == $cards[Card][unit_id]) { echo $cards[SaleDetail][date_pid_signed]; }
  </code></pre>
  
  <p>I'm not sure exactly how to go about getting the above to work with the current array structure as below.</p>
  
  <p>Any ideas how I can get around this? </p>
  
  <p>Thanks</p>
  
  <pre><code>$cards = Array
  (
  [0] =&gt; Array
      (
          [Card] =&gt; Array
              (
                  [id] =&gt; 210
                  [property_id] =&gt; 4
                  [unit_id] =&gt; 90
              )
  
          [SaleDetail] =&gt; Array
              (
                  [property_agent] =&gt; 
                  [date_pid_signed] =&gt; 2012-06-15
                  [property_date_listed] =&gt; 
              )
  
      )
  
  [1] =&gt; Array
      (
          [Card] =&gt; Array
              (
                  [id] =&gt; 209
                  [property_id] =&gt; 4
                  [unit_id] =&gt; 103
              )
  
          [SaleDetail] =&gt; Array
              (
                  [property_agent] =&gt; 
                  [date_pid_signed] =&gt; 2011-10-21
                  [property_date_listed] =&gt; 
              )
  
      )
  </code></pre>
  
  <p>)</p>