[thelist] Reversing whole sentence by word

S. F. Alim salim at vodatel.com
Sun Jan 14 01:19:23 CST 2007

Hi lists,


How can I reverse whole string by word by word?

This is what I am doing now.



function rev_arr($str) {

            return $arr = join(" ",array_reverse(split(" ",$str)));





I google for it and found above function which I put it on my side it is
working fine until if there is new line or carriage return. Well I am not a
programmer and this question must be totally newbie but I need help on this


Really appreciate in advance.




More information about the thelist mailing list