- array_combine: documentation ( source)
- array_column: documentation ( source)
- array_chunk: documentation ( source)
- print_r: documentation ( source)
- preg_split: documentation ( source)
<?php
$input = '1-350,9-390.99';
$chunks = array_chunk(preg_split('/(-|,)/', $input), 2);
$result = array_combine(array_column($chunks, 0), array_column($chunks, 1));
print_r($result);