title: PHP in_array function, why this doesn't work?
body: <p>I have this array, generated from a database:</p>
  
  <pre><code>do {
      $rsvp_array[$row_rsRSVP['rsv_guest']] = array(
          'id' =&gt; $row_rsRSVP['rsv_id'],
          'guest' =&gt; $row_rsRSVP['rsv_guest'],
          'confirmed' =&gt; $row_rsRSVP['rsv_confirmed']
      );
  } while ($row_rsRSVP = mysql_fetch_assoc($rsRSVP));
  </code></pre>
  
  <p>It's vey fine, with print_r() I get this:</p>
  
  <pre><code>Array
  (
      [1] =&gt; Array
          (
              [id] =&gt; 1
              [guest] =&gt; 1
              [confirmed] =&gt; 1
          )
  
      [15] =&gt; Array
          (
              [id] =&gt; 2
              [guest] =&gt; 15
              [confirmed] =&gt; 0
          )
  
      [5] =&gt; Array
          (
              [id] =&gt; 3
              [guest] =&gt; 5
              [confirmed] =&gt; 1
          )
  
      [10] =&gt; Array
          (
              [id] =&gt; 4
              [guest] =&gt; 10
              [confirmed] =&gt; 1
          )
  
      [6] =&gt; Array
          (
              [id] =&gt; 5
              [guest] =&gt; 6
              [confirmed] =&gt; 0
          )
  
  )
  </code></pre>
  
  <p>So I know that the array is working.</p>
  
  <p>Now I need to see if a number is in the main array, i.e.:</p>
  
  <pre><code>if (in_array(15, $rsvp_array)) { echo 'OK'; }
  </code></pre>
  
  <p>And well, this doesn't work! Number 15 is the second key of the array, but no luck!
  Where am I wrong?
  Thanks in advance for the answers...</p>