I have a sting, containing numbers and letters,
such that:
abc 12,345 def
I want reversing only the words, so the result will look:
def 12,345 abc.
I know how to reverse the all string:
$array = explode(" ", $string);
foreach ($array as &$word) {
$word = strrev($word);
}
$rev_string = implode(" ", $array);
but don't know how to deal with the numbers.
Thanks