<?php
$str = "1
00:05:50,141 --> 00:05:54,771
This is what was said1
2
00:05:50,141 --> 00:05:54,771
This is what was said2
Boensnglr
Dldldlsls
3
00:05:50,141 --> 00:05:54,771
This is what was said3
4
00:05:50,141 --> 00:05:54,771
This is what was said4
LLLL
5
00:05:50,141 --> 00:05:54,771
This is what was said5";
$count = explode(PHP_EOL.PHP_EOL, $str);
foreach($count as &$line){
$line = implode(PHP_EOL, array_slice(explode(PHP_EOL, $line), 2));
}
echo implode(PHP_EOL.PHP_EOL, $count);