in reply to Re: Five Ways to Reverse a String of Words (..., Oz)
in thread Five Ways to Reverse a String of Words (C#, Perl 5, Perl 6, Ruby, Haskell)
no php yet? no respect! ;)
<?php
$reversed = implode(' ', array_reverse(explode(' ', $str)));
?>
kept it on one line so the perl guys can understand it :)
<?php
$reversed = implode(' ', array_reverse(explode(' ', $str)));
?>
kept it on one line so the perl guys can understand it :)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Five Ways to Reverse a String of Words (..., Oz)
by Anonymous Monk on Feb 22, 2008 at 09:12 UTC |
In Section
Meditations