in reply to Splitting a long string

I have not actually understood your goal but
$temp = substr($line, $i * 1_000, 1000);
will give you the substrings you seem to want.