title: Exploding an array and removing prefix
body: <p>I an trying to create an array using explode for a string.</p>
  
  <p>Here is my string:</p>
  
  <pre><code>$string = "a:1,b:2,c:3,d:4,e:5,f:6,g:7";
  </code></pre>
  
  <p>And here's my complete code:</p>
  
  <pre><code>$string = "a:1,b:2,c:3,d:4,e:5,f:6,g:7";
  $d = explode(',', $string);
  echo '&lt;pre&gt;';
  var_dump($d);
  </code></pre>
  
  <p>and after that i got the result like this..</p>
  
  <pre><code>array(7) {
    [0]=&gt;
    string(3) "a:1"
    [1]=&gt;
    string(3) "b:2"
    [2]=&gt;
    string(3) "c:3"
    [3]=&gt;
    string(3) "d:4"
    [4]=&gt;
    string(3) "e:5"
    [5]=&gt;
    string(3) "f:6"
    [6]=&gt;
    string(3) "g:7"
  }
  </code></pre>
  
  <p>How can I create an array like this instead?:</p>
  
  <pre><code>array(7) {
    ["a"]=&gt;
    string(1) "1"
    ["b"]=&gt;
    string(1) "2"
    ["c"]=&gt;
    string(1) "3"
    ["d"]=&gt;
    string(1) "4"
    ["e"]=&gt;
    string(1) "5"
    ["f"]=&gt;
    string(1) "6"
    ["g"]=&gt;
    string(1) "7"
  }
  </code></pre>