How can I separate a string so that the first words are in one variable and the last word is in another?
<p>I have a string that looks like this: <code>This is a sample string</code></p>

<p>and I want to separate the sting so that the first words are in one variable and the last word is in another. So:</p>

<pre><code>$beginning = "This is a sample"
$lasword = "string"
</code></pre>

<p>How can I do that? </p>
