title: PHP: flatten multidimensional array
body: <p>I need to explode by "," then ":". Easy enough...</p>
  
  <pre><code>$alttitle = "35:title1,36:title2, 59:title5"
  $replacetitles = explode(",",$alttitle);
  for ($i = 0 ; $i &lt; count($replacetitles) ; $i++) {
     $replacetitle[] = explode(":", $replacetitles[$i]);
  }
  </code></pre>
  
  <p>Which produces...</p>
  
  <p>Array ( [0] => Array ( [0] => 35 [1] => title1 ) [1] => Array ( [0] => 36 [1] => title2 ) [2] => Array ( [0] => 59 [1] => title5 ) )</p>
  
  <p>...but the number 35,36,59 are unique so I want this to become the key for the array?</p>
  
  <p>Array ( [35] => title1 [36] => title2 [59] => title5 )</p>