How do I retrieve last word or character in PHP
<p>Example string</p>

<pre><code>$string = 'how-do-i-retrieve-last-word'
$string = 'how-do-i-retrieve-last-word-2'
$string = 'how-do-i retrieve-last word-123'
$string = 'how do i retrieve last word test'
</code></pre>

<p>I want to retrieve a last word on string above and the result should be :</p>

<pre><code>word
2
123
test
</code></pre>
