title: how to store multiple line of result in an array and later read them one by one in PHP-SQL
body: <pre><code>&lt;?php
  mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error());
  mysql_select_db("Database_Name") or die(mysql_error()); 
  $result = mysql_query("SELECT &lt;column name&gt; FROM &lt;table name&gt;"); 
  $data=array();  // to create an array to store result
  while ( $row= mysql_fetch_array( $result ))
     {
      $data = $row;
     }
  
  ?&gt; 
  </code></pre>
  
  <p>This query returns multiple lines of result like:</p>
  
  <pre><code>abc
  def
  ghk
  ...
  ...
  ...
  ...
  ...
  </code></pre>
  
  <p>My question is how can I change the looping structure so that each row from output value is feed to the parser one by one. </p>
  
  <p>Using the code snippet above, only one is feed to the parser. But I want each row to be feed to parser one by one. </p>
  
  <p>I found the solution. It works.  </p>
  
  <pre><code>&lt;?php 
   mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error()); 
   mysql_select_db("Database_Name") or die(mysql_error());  
  $result = mysql_query("SELECT &lt;column name&gt; FROM &lt;table name&gt;");  
  while ( $row= mysql_fetch_array( $result ))  
  {  
  echo $row['column name']; // to check does it works fine. 
  // pass the variable " $row['column name'] " as paramter to parser function it works.  
  //I have tried it. 
  }  
  
  ?&gt;  
  </code></pre>
  
  <p>I was using wrong way to input in a array. The best way is to pass directly variable inside the loop to parser function. Then we wouldn’t need any external array to store the results. </p>