$string = '6=1;4=2;1=3;5=4;2=5;3=6';Array
(
    [6] => 1
    [4] => 2
    [1] => 3
    [5] => 4
    [2] => 5
    [3] => 6
)$arr = explode(';', $string);
$output = [];
foreach ($arr as $item) {
    list($key, $value) = explode('=', $item);
    $output[$key] = $value;
}
var_dump($output);$output = [];
array_map(function($item) use (&$output) {
    list($key, $value) = explode('=', $item);
    $output[$key] = $value;    
}, explode(';', $string));