PHP - 通过分隔符拆分字符串

I have a string like this

$string = "
##
First name A
Last Name A
email@emailA.com
##<br />
##
First name B
Last Name B
email@emailB.com
##<br />
##
First name C
Last Name C
email@emailC.com
##<br /> 
.......
";

and a keyword,

$keyword = "email@emailB.com";

What i want is when searching for the keyword it outputs the string betwen "## and ##" in this case

First name B
Last Name B
email@emailB.com

Any help is much appreciated.

Use regular expressions :

echo preg_replace('/#+(.*?'.preg_quote($keyword,'/').'.*?)#+/i','$1',$string);