title: Loop through multidimensional array and find matching values
body: <p>I'm looking for a way to loop through a multidimensional array and with an if (or simular) find matching values if key master is true.</p>
  
  <p>The array:</p>
  
  <pre><code>    Array
  (
      [0] =&gt; Array
          (
              [namn] =&gt; Vardagsrum
              [IP] =&gt; 192.168.1.232
              [rincon] =&gt; RINCON_000E58A64F1601400
              [rincon_live] =&gt; RINCON_000E58A64F1601400
              [master] =&gt; 1
          )
  
      [1] =&gt; Array
          (
              [namn] =&gt; Badrum
              [IP] =&gt; 192.168.1.137
              [rincon] =&gt; RINCON_B8E937580A5801400
              [rincon_live] =&gt; RINCON_000E58A64F1601400
              [slave] =&gt; 1
          )
  
      [2] =&gt; Array
          (
              [namn] =&gt; Kök
              [IP] =&gt; 192.168.1.134
              [rincon] =&gt; RINCON_000E58F8C9E001400
              [rincon_live] =&gt; RINCON_000E58A64F1601400
              [slave] =&gt; 1
          )
  
  )
  </code></pre>
  
  <p>If i got a master => true (in this case vardagsrum) I would like the loop to match all slave => true rincon_live values against the masters rincon value.</p>
  
  <p>I dont know if that makes any sense at all but if I got one or more masters, I want to check  the slaves rincon against the masters to see which slaves is connected to which master and after that do something.</p>
  
  <p>Thanks for the help!</p>