title: How to explode multidimensional array with key and value
body: <p>I have a string like this:</p>
  
  <pre><code>$string = Leader,Brian; Elder,Nina,Maria; Member,Duke,Rai,Mike
  </code></pre>
  
  <p>What I've done:</p>
  
  <pre><code>$explode = ("; ", $string);
  </code></pre>
  
  <p>Then it will show like:</p>
  
  <pre><code>Array ([0] =&gt; Leader,Brian [1] =&gt; Elder,Nina,Maria [2] =&gt; Member,Duke,Rai,Mike)
  </code></pre>
  
  <p>But I don't like that. I want to make a multidimensional array with key and value, like this:</p>
  
  <pre><code>Array ([Leader] =&gt; Brian [Elder] =&gt; Array ([0] =&gt; Nina [1] =&gt; Maria) 
         [Member] =&gt; Array ([0] =&gt; Duke [1] =&gt; Rai [2] =&gt; Mike))
  </code></pre>
  
  <p>How to show it in table tag html like this?</p>
  
  <pre><code>Leader  |  Brian
  Elder   |  Nina
          |  Maria
  Member  |  Duke
          |  Rai
          |  Mike 
  </code></pre>
  
  <p><strong>NB:</strong> You can change the separator in string if it's difficult with separator like that</p>