I have email template data and I'm trying to get it as associative array with keys and labels. But I can't make proper array as it should be. My template is the following:
key_1:label1,key2:label2,...
I get this text from database in this way:
$subject = explode(',', $subject);
  foreach($subject as $s)
  {
    $subjects[] = explode(':', $s);
  }
var_dump($subjects);
And I'm getting array with this structure:
array(2) {
  [0]=>
  array(2) {
    [0]=>
    string(12) "key1"
    [1]=>
    string(16) "label1"
  }
  [1]=>
  array(2) {
    [0]=>
    string(12) "key2"
    [1]=>
    string(12) "label2"
  }
}
How to make array with keys ->key1, key2 and values -> label1, label2? Thanks!