title: Searching id in an array
body: <p>I need to search an array and print the matched value.
  For which my array would be:</p>
  
  <pre><code>$my_values = array(
  '' =&gt; '---',
  '12' =&gt; 'Bungalows',
  '43' =&gt; 'Character property',
  '277' =&gt; 'Guest house',
  '49' =&gt; 'Flat share'
  );
  </code></pre>
  
  <p>This is my array and I need to display the name if it matches the id. Suppose, if the id is 12 the Bungalows needs to be displayed.
  I know this:</p>
  
  <pre><code>$key = array_search('Bungalows', $my_values);
  </code></pre>
  
  <p>This code gives me 12 but I need to output 'Bungalows' instead of 12. How would I go about doing this?</p>