title: PHP Text Area to MySQL query variables does not return all row results
body: <p>I am using a text area in order allow searching of multiple items at once and output the results to a table. Everything works fine when only one item is placed into the text area and searched, however the query results of the first line/search item are not returned if more than one item is searched. My code:</p>
  
  <pre><code>&lt;textarea name="search_items" rows="2" cols="30"&gt;&lt;/textarea&gt;
  
  $input = $_POST['search_items'];
  list($pc1, $pc2) = explode("\n", $input);
  
  $desc = mysqli_query($my_connection,"SELECT PART_DESC FROM inventory WHERE PARTCODE = '$pc1' OR PARTCODE = '$pc2';");
  
  $i=1;
  while($row_desc = mysqli_fetch_assoc($desc)) { 
      ${'pc_desc'.$i} = $row_desc['PART_DESC']; 
      $i++; 
  } 
  
  &lt;table&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;?php echo "$pc1"; ?&gt;&lt;/td&gt;
          &lt;td&gt;&lt;?php echo $pc_desc1; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;?php echo "$pc2"; ?&gt;&lt;/td&gt;
          &lt;td&gt;&lt;?php echo $pc_desc2; ?&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>$pc1 echos out line 1 of the text area and <code>$pc2</code> echos out line 2 of the text area. I get the correct results echoed out for <code>$pc_desc2</code> but <code>$pc_desc1</code> is blank. If I manually assign <code>$pc1</code> and <code>$pc2</code> like this:</p>
  
  <pre><code>$pc1 = "ABC";
  $pc1 = "XYZ";
  </code></pre>
  
  <p>both <code>$pc_desc1</code> and <code>$pc_desc2</code> return correctly. Please Help!</p>