How to Move the first two words to the two words thereafter in PHP?
<p>I know this is kinda weird, <i>but I need this to complete my task</i>.</p>

<p>I want to move the first two words to the two words thereafter, example is in my (error) code :</p>

<pre><code>&lt;?
$sentence = "zero one two three four five six seven eight";
$sentence2 = explode (" ",$sentence);
$total = count($sentence2);
for ($i = 4; $i &lt; $total; ++$i) {
$result = $sentence2[2]." ".$sentence2[3]." ".$sentence2[0]." ".$sentence2[1]."  ".$sentence2[$i];
}
echo "Original sentence : ".$sentence;
echo "&lt;br&gt;Result : ".$result;
?&gt;
</code></pre>

<p>but the result from that code is not what i want, the result is</p>

<pre><code>two three zero one eight
</code></pre>

<p>i want the result :</p>

<pre><code>two three zero one four five six seven eight
</code></pre>

<p>can you help me make a better code?</p>
