title: Get array values and put in while
body: <p>I get some values from DB and put results on array</p>
  
  <p>GET from users</p>
  
  <pre><code>$foo = array();
  $query2 = mysql_query("SELECT item_audit_id FROM mod_users_files");
  while ($row = mysql_fetch_assoc($query2)) {
  $foo['item_audit_id'] = $row;
  </code></pre>
  
  <p>When I print <code>print_r($foo);</code> i get correct values, like</p>
  
  <pre><code>Array ( [item_audit_id] =&gt; Array ( [item_audit_id] =&gt; 13 ) ) 
  
  Array ( [item_audit_id] =&gt; Array ( [item_audit_id] =&gt; 1 ) ) 
  </code></pre>
  
  <p>Now, i have another while, and 'm like to check if item_audit_id exist and show information to user:</p>
  
  <pre><code>&lt;tbody&gt;
      &lt;?php
      $i = 0;
      while ($i &lt; $num) {
          $class_item_id = mysql_result($result,$i,"class_item_id");
          $class_item_descrption = mysql_result($result,$i,"class_item_description");
          ?&gt;
          &lt;tr class="grade"&gt;
              &lt;td&gt;&lt;?php echo $class_item_id; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $class_item_description; ?&gt;&lt;/td&gt;
              &lt;td&gt;
                  &lt;?php 
                  if (in_array($class_item_id, $foo)) { 
                      echo "&lt;p style='color:green'&gt;Exist&lt;/p&gt;";
                  } else {
                      echo "&lt;p style='color:red'&gt;Missing&lt;/p&gt;";   
                  }
                  ?&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;?php
          $i++;
      }
      ?&gt;                    
  &lt;/tbody&gt;
  </code></pre>
  
  <p>If I declare array in this way:</p>
  
  <pre><code>$foo = array("1", "2", "3", "4", "5", "6");
  </code></pre>
  
  <p>results are correct, on while below i cant get any results.</p>
  
  <p>Where do I wrong?</p>
  
  <p>Thanks all for help;</p>