[thelist] Reversing whole sentence by word

0 8 0112358 at gmail.com
Sun Jan 14 17:34:39 CST 2007


If it's a new line / carraige return that's causing a problem, you
could do a simple regex to strip it out first.

On 1/14/07, S. F. Alim <salim at vodatel.com> wrote:
>
>
> One more thing I forget to mention is that I am using PHP4.
>
> Regards,
> Faisal
>
> ________________________
>
> 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
> matter.
>
>
>
> Really appreciate in advance.
>
>
>
>
>
> Faisal.
>
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>
>
>
>
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>



More information about the thelist mailing list