title: List down all comma separated values using PHP
body: <p>I'm trying to list down all the comma separated values.</p>
  <pre><code> &lt;?php
       $records = [
      [&quot;WLP001&quot;,&quot;Cream Ale,Dusseldorf Altbier,Kolsch,Ordinary Bitter&quot;],
      [&quot;WLP002&quot;,&quot;American Amber,American Brown Ale,American India Pale Ale,American Pale Ale,American Porter,Apple Wine,Barleywine Ale,Common Perry,Cream Ale,Dusseldorf Altbier,English Brown Ale,English Cider,English India Pale Ale,English Old Ale,English Pale Ale,Extra Special Bitter,Foreign Export Stout,French Cider,Irish Dry Stout,Irish Red Ale,Kolsch,Oatmeal Stout,Ordinary Bitter,Scotch Ale (Wee Heavy),Sweet Stout,Wheat Ale&quot;],
  ];
  
    for ($i=0; $i &lt; count($records); $i++) { 
      $styles = explode(',',$records[$i][1]);
      echo $styles[0].&quot;&lt;br&gt;&quot;;
     }
   ?&gt;
  </code></pre>
  <p>For example</p>
  <p>for <strong>&quot;WLP001&quot;</strong>  &amp; <strong>&quot;WLP002&quot;</strong></p>
  <pre><code> Cream Ale,
   Dusseldorf Altbier,
   Kolsch,
   Ordinary Bitter,
   American Amber,
   American Brown Ale,
   American India Pale Ale,
  </code></pre>
  <p>and it will continue the rest as long as the data is separated by comma.</p>
  <p>Because the output right now is</p>
  <p><a href="https://i.stack.imgur.com/2F6dy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2F6dy.png" alt="enter image description here" /></a></p>