- array_map: documentation ( source)
- var_dump: documentation ( source)
- explode: documentation ( source)
- preg_split: documentation ( source)
<?php
$str = '#ORGNR "123" 1
#ACCOUNT 1010 "Kassa"
#ACCOUNT 1050 "Bank"
#IB -1 1010 1923.15
#IB 1 1050 201.42';
$arr2 = array_map(function($line){
return preg_split("/\s+/", $line);
}, explode("\n", $str));
var_dump($arr2);