How can I flip the order of text
$string = 'last row
something inbetween
first row';
Result should be:
first row
something inbetween
last row
Note this is no A-Z ordering, just flipping it.
Is it possible? A solution in PHP, javascript or jquery would be welcome
You can split the string and reverse the array:
Edit: no one wrote an javascript solution (same logic as php script):
Edit: an example: http://jsfiddle.net/ceKyF/