I have a file which contain data like this -
keysuccess
line1
line2
keyerror
line3
line4
line5
keyfail
line6
line7
From here I would like to extract the line3, line4, and line5 which is the group of keyerror
something like -
$array = explode("keyerror", file_get_contents($file));