title: search associative array by value
body: <p>I'm fetching some JSON from flickrs API. My problem is that the exif data is in different order depending on the camera. So I can't hard-code an array number to get, for instance, the camera model below. Does PHP have any built in methods to search through associative array values and return the matching arrays? In my example below I would like to search for the <code>[label] =&gt; Model</code> and get <code>[_content] =&gt; NIKON D5100</code>.</p>
  
  <p>Please let me know if you want me to elaborate.</p>
  
  <pre><code>print_r($exif['photo']['exif']);
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [tagspace] =&gt; IFD0
              [tagspaceid] =&gt; 0
              [tag] =&gt; Make
              [label] =&gt; Make
              [raw] =&gt; Array
                  (
                      [_content] =&gt; NIKON CORPORATION
                  )
  
          )
  
      [1] =&gt; Array
          (
              [tagspace] =&gt; IFD0
              [tagspaceid] =&gt; 0
              [tag] =&gt; Model
              [label] =&gt; Model
              [raw] =&gt; Array
                  (
                      [_content] =&gt; NIKON D5100
                  )
  
          )
  
      [2] =&gt; Array
          (
              [tagspace] =&gt; IFD0
              [tagspaceid] =&gt; 0
              [tag] =&gt; XResolution
              [label] =&gt; X-Resolution
              [raw] =&gt; Array
                  (
                      [_content] =&gt; 240
                  )
  
              [clean] =&gt; Array
                  (
                      [_content] =&gt; 240 dpi
                  )
  
          )
  </code></pre>