- 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';
$arr = explode("\n", $str); // you use file but it's the same thing
foreach($arr as &$val){
$val = preg_split("/\s+/", $val);
}
var_dump($arr);