title: How to create particular array from string in php
body: <p>I Have $str string variable &amp; i want to make a $array array from $str string.</p>
  
  <pre><code>    $str = "BKL|bkl,EXH|exh,FFV|ffv,LEC|lec,AUE|aue,SEM|sem";
  
      Final array should be 
      $array = array(
      'BKL'=&gt; 'bkl',
      'EXH' =&gt; 'exh',
      'FFV' =&gt; 'ffv',
      'AUE' =&gt; 'aue'  
      );
  </code></pre>