title: how to store values to array from mysql database in php
body: <h2>The following is my scenario</h2>
  
  <p>i have the following databases</p>
  
  <pre><code>employee(e_no,e_name,e_contact,e_mail)
  project(p_no,e_no,p_name)
  project_assigned(id,pno,eno)
  task(id,pno,tasks)
  </code></pre>
  
  <p>Now I have two particular files called <strong>employee_data_sheet.php</strong> and <strong>addtask.php</strong>
  I want to accomplish the following:
  When I post a task to <strong>addtask.php</strong> I want to view which employee has got the task in which project in <strong>employee_data_sheet.php</strong></p>
  
  <p>Following is the code snippet:
  (my <strong>addtask.php</strong> is working fine error in employee_data_sheet)</p>
  
  <pre class="lang-php prettyprint-override"><code>$query34="SELECT p_no FROM project_assign WHERE e_no='$empno'";
  $res34=  mysql_query($query34);
  while($row34=  mysql_fetch_array($res34))
  {
    $pnum=array();
    $pnum=$row34['p_no'];
    $query35="SELECT p_name FROM project WHERE p_no='$pnum'";
    $res35=mysql_query($query35);
    while($row35=  mysql_fetch_array($res35))
    {
      $prname1=array();
      $prname1=$row35['p_name'];
    }
  }
  </code></pre>
  
  <p>The problem  is that I am not able to store the result of query to an array with comma separation.
  Please help me to store the result of a query to an array with comma separation</p>