文字列の最後の 3 つの単語を先頭に移動したいと考えています。たとえば、次の 2 つの変数があります。
$vari1 = "It is a wonderful goodbye letter that ultimately had a happy ending.";
$vari2 = "The Science Museum in London is a free museum packed with interactive exhibits.";
次のようになる必要があります。
"A happy ending - It is a wonderful goodbye letter that ultimately had."
"With interactive exhibits - The Science Museum in London is a free museum packed."