<?php$string = 'A-Y2-P2-Z35';$dividir = explode('-',$string); print_r($dividir);// Retorna: Array ( [0] => A [1] => Y2 [2] => P2 [3] => Z35 ) ?>
<?php $string = 'A-Y2-P2-Z35';$dividir = explode('-',$string); foreach ($dividir as $k => $v) { if (preg_match('/([a-zA-Z])([0-9]+)/',$v,$matches)) { $matches[1]; // = Letra $matches[2]; // = Número }}