Skip to main content
1 de 2
Xerif
  • 7.4k
  • 3
  • 19
  • 42

Podrías hacer un explode () y luego partir en array en trozos con chino().

Ejemplo

 $data = 'Flint,Rathleton,390,Kroox,Kazordoon,390,Sam,Thais,390';
 $array = array_chunk(explode(',', $data), 3);
 print_r($array);

Resultado

Array
(
[0] => Array
    (
        [0] => Flint
        [1] => Rathleton
        [2] => 390
    )

[1] => Array
    (
        [0] => Kroox
        [1] => Kazordoon
        [2] => 390
    )

[2] => Array
    (
        [0] => Sam
        [1] => Thais
        [2] => 390
    )
)
Xerif
  • 7.4k
  • 3
  • 19
  • 42