私は、最初の文字に応じて各単語をグループ化し、グループを他の文字でソートしたいという段落があります。最初の文字に応じて単語を分割する
サンプルテキスト:最後は、市民頼むかもしれないのはなぜ最初sentence-
ため
$text = "Why end might ask civil again spoil. She dinner she our horses depend. Remember at children by reserved to vicinity. In affronting unreserved delightful simplicity ye. Law own advantage furniture continual sweetness bed agreeable perpetual. Oh song well four only head busy it. Afford son she had lively living. Tastes lovers myself too formal season our valley boy. Lived it their their walls might to by young.";
期待される結果は、再びそれを行うには
a => again, ask
c => civil
e => end
m => might
s => spoil
w => Why
そして、何が結果を正確に予想されるのですか? – Shafizadeh
各単語で段落をグループ化し、他の文字でグループを並べ替える必要があります。 –
@Shafizadeh、私は何が必要な私の質問を更新しました。 –