title: Split the result of group_concat function
body: <p>I have here a mysql query to display information from database inside of jquery accordion. I used GROUP_CONCAT to group the supplier and code.</p>
  
  <p>Here's my Table Structure.</p>
  
  <pre><code>id    | supplier  |  code
  --------------------------
     1  |     DELL  |  9001
     2  |     DELL  |  9002  
     3  |     HP    |  3201
     4  |     HP    |  4112
  </code></pre>
  
  <p>Query</p>
  
  <pre><code>  $mysqli = new mysqli("localhost", "root", "", "table");
    $result = $mysqli-&gt;query("Select (SELECT group_concat(DISTINCT code) FROM table) as a, (SELECT group_concat(DISTINCT supplier) FROM table) as b");
  
  while($row = $result-&gt;fetch_assoc()){
  echo '&lt;h3&gt;'.$row['b'].'&lt;/h3&gt;';
  echo '&lt;div&gt;'.$row['a'].'&lt;/div&gt;';
  }
  </code></pre>
  
  <p>Result in localhost</p>
  
  <pre><code>    a     | b
  ----------------
  9001,9002 | DELL
  </code></pre>
  
  <p>What I expect to be the output in html per accordion div</p>
  
  <pre><code>DELL        
  9001
  9002
  -----
  HP        
  3201
  4112
  </code></pre>
  
  <p>so that I can make a link for each code like</p>
  
  <pre><code>&lt;a href=""&gt;'.$row['a'].'&lt;/a&gt;
  </code></pre>
  
  <p>Any help will appreciate.</p>