php从一个句子创建两个单独的句子

I want to separate two sentences from one sentence in php.

For ex. Mr. ABC is good in math and science.

Will be

  1. Mr. ABC is good in math

  2. Mr. ABC is good in science

Thanks in advance

EDIT:

May be regular expression. I am trying convert paragraph to speret statement. Then single statement convert two sub statement. using following regular expression.

$str = "Mr. ABC is good in math and science. but he is poor in sport";
$sentences = preg_split('/(?<=[.?!;,])\s+(?=[a-z])/i', $str);

I want to calculate sentiment of text. that's why i need to split these statement. (How many percentage of positive statement is?)

Your question is incomplete. However you may consider using substring. and finally do concatenation. example, in the two sentences:

$str1 = "Mr. ABC is good in math";
$str2 = "Mr. ABC is good in science";
$mainstr = substr($str1, 0, 15)." and ".substr($str2, 19, 7);

Check out that and see if it helps. Otherwise, who us what you have done first