さまざまな側面から最初の 25 文字を出力する文字列から部分文字列を取得する必要があります。ここで、部分文字列は、スペースではなくコンマ (,) のみを考慮する必要があります。
シナリオ 1:
$str = "the, quick, brown, fox";
$res = "the, quick, brown, fox";
シナリオ 2:
$str = "the, quick, brown, fox, jumps, over, the, lazy, dog!";
$res = "the, quick, brown, fox, more";
シナリオ 3:
$str = "the quick, brown fox, jumps over, the lazy dog!";
$res = "the quick, brown fox, more";
シナリオ 4:
$str = "the quick brown fox, jumps over, the lazy dog!";
$res = "the quick brown fox, more";
助けてください!ありがとう。
私の英語で大変申し訳ありません!