title: i can't get multiple rows into array from mysql database?
body: <p>i can't get multiple rows into array from mysql database? i have code but it is not working or not showing all rows when i echo into textbox?</p>
  
  <pre><code>&lt;?php 
  if(is_array($_SESSION['pid']))
  {
    $pid = join(',',$_SESSION['pid']); 
    $result=mysql_query("SELECT id AS wid FROM mywishlist where pid='$pid'") 
              or die("Id    Problem"."&lt;br/&gt;&lt;br/&gt;".mysql_error());
    $results= array();
    $i=0; // add the new line
    while($row=mysql_fetch_array($result)){
      $results[$i] = $row['wid'];
      $i++;
    }
    $results;
  }
  $max=count($results);
  for($j=0; $j&lt;$max; $j++)
  {
  ?&gt;
  &lt;input type="text" name="wid[]" value="&lt;?php echo $results[$j]; ?&gt;" /&gt;
  &lt;?php } ?&gt;
  </code></pre>