Concisely reversing a string by word
<?php $reversed_s = implode(' ',array_reverse(explode(' ',$s))); ?>