Reverse a string with php

后端 未结 16 1086
南笙
南笙 2020-12-03 23:42

I am trying to find a way to reverse a string, I\'ve seen alternatives but i wanted to to it this way thinking outside the box and not using anyone else\'s code as an altern

16条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-04 00:28

    You can use it:

    echo $reversed_s = join(' ',array_reverse(explode(' ',"Hello World")));
    

提交回复
热议问题