Positive lookaheads:
$array = preg_split("/(?=1060\s)/",$str);
(?=1060\s)
is a positive lookahead - it asserts that the regex inside it (1060\s
) can be matched, but doesn't match it. Therefore, this will match an empty string right before the match and split the text correctly.