| Viewed 139 times

How I should sort a string by Its Last Character in PHP?


I need a function that takes a string of words and returns a string sorted alphabetically by the last character of each word. * If two words have the same last character, sort by the order they originally appeared.

PHP