title: how to fetch data seprately stored in single column stored with commas from db?
body: <p>I am fetching data from the first table this is fine and I am getting output. in this table data in column name 'std_list' is stored like 1,2,3,4,5,.. when I echo it gives output 1,2,3,4,5,.... but when I use this variable to get data from another table it uses only 1 to fetch data from other tables.</p>
  
  <pre><code>&lt;span&gt;&lt;?php echo $user['std_list'];?&gt;&lt;/span&gt;&lt;/p&gt;        
  
  &lt;?php
      //$query="SELECT * FROM events Where std_list != '0' ";
  $query="SELECT * FROM events where id='$eid'";
  $showdata=mysql_query($query) or die(mysql_error());
  $user=mysql_fetch_array($showdata);
  ?&gt;
  </code></pre>
  
  <p>on the basis of first table output i am trying to fetch data from another table.</p>
  
  <pre><code>          &lt;?php
                  $sid=$user['std_list'];
                  //$query="SELECT * FROM events Where std_list != '0' ";
                  $query="SELECT * FROM student_info where id='$sid'";
                  $showstudent=mysql_query($query) or die(mysql_error());
                  while($students=mysql_fetch_array($showstudent))
                  {
              ?&gt;
  </code></pre>
  
  <p>this is my code the data stored in 'std_list' column is like 1,2,3,4,5,6..... and i want to fetch each  numeric seprately but according to my code it is only fetching first numeric only from other table.</p>