$string = "Строка 1\nСтрока 2\nСтрока 3 ... \nСтрока N"
Строка 1
Строка 2
Строка 3
....
Строка N
$test = substr(strrchr($string, "\n"), 1 );
$string = "Строка 1\nСтрока 2\nСтрока 3";
$lines=explode("\n",$string);
$test = $lines[count($lines)-1]
echo $test;